Hi Everyone

I am not a full time programmer.

I had been using Python for everything and then went to PHP to build my website. I really love PHP now but surely it is the wrong tool for many offline tasks.

I know Python is strongly typed but after using PHP it just seems too fussy for my needs. There are many debates about programming languages, that language A does not have the feature of Language B but could anyone feedback about the most predictable language. I just need a language that helps me get simple things done faster. Would Ruby be a good choice?

Thanks in advance-Patrick

Recommended Answers

All 9 Replies

Hi Patrick,

Unfortunately it is not as simple as that. Different languages are better at different tasks. Most are designed to perform specific tasks at first and grow from there. Really what you need to do is work out what you are trying to achieve and then select the best tools for the job.

Hope this helps,
darkagn

Hmm, for offline tasks, you would want to go to a more traditional operable language (C++, java, etc) . Even then, certain of those languages can be distilled into which tasks does one perform over another. So, a few examples, if you want to do operating system programming (Creating command line commands like grep, etc.) use good ol' fashioned C. Games, intensive programs that require a lot of memory, C++. Windows look and feel GUI programs, I would recommend C#. For a very happy medium, I recommend java. I find it to be the most predictable language I have worked with. You can easily add GUI desktop components with Swing, it enforces good programming habits, it runs much cleaner than a scripting language like PHP, Python or Perl. I however, miss C++ and have caught java not managing it's memory in the way I would expect it to.

php is not a programming language it is a scripting language.

php is not a programming language it is a scripting language.

Scripting languages are programming languages.

If you really want to split hairs, scripting languages are interpreters, Perl for example actually compiles code to C which is where the actual work is done. This is not exactly the case but is close enough conceptually. Some folks feel strongly about this, while others believe "if it looks like a duck . . ." So scripting languages are interpreters (Perl, PHP, VB, JavaScript etc.) and languages are languages.
Is java an interpreter? you can pass any type of data as Object but you need to cast it before you implement it to the expected data type.
Anything that is not strongly typed can be argued as being an interpreter. But essentially interpreters are animals which take your code (a script) and turn it into compiled code using another language specification.
I think a perfect example would be Haskel which is an interpreter for prolog.

Bestjew has taken this tread in a totally different direction, I am not sure why he wants to take time out of his day to beat on Newbies but if anyone has any more feedback with the topic matter i would greatly appreciate it

>Would Ruby be a good choice?

Yes, given that it's not just another scripting language but a fun language which *has* an enterprise standing. Ruby seems to be living up to its name of a "fun programming language". So IMO, Ruby and Clojure if you are going for dynamic programming languages and Scala[used at Twitter] and Haskell if you are going for a static, strongly typed language. Also, a stack based language like Factor would surely entertain you by changing the way you look at programming.

Also I tend to agree with darkagn that there is no ideal language. Some language might be able to do X sort of things in a small amount of code but require a lot of boiler plate code when doing Y. Like they say, the more tools in your toolbox, the merrier.

>Bestjew has taken this tread in a totally different direction

His post was on topic though and certainly didn't warrant a rep comment like "that guy was just a ****". If you find something annoying or wrong or off-topic, there is always a flag bad post button provided for that, no back seat moderation please. Consider this as your first warning; refer to the forum rules for details.

I suppose it depends what you mean by predictable...

Dynamic languages like Ruby, Javascript etc can be unpredictable (unless you've tested them) because they perform so much dynamic run-time binding, you dont quite know what they'll do until you've run them.

Java and C# are pretty predictable in some ways. Java is compiled to bytecode, which preserves metadata such as the methods on a class, method signatures etc., which allows you to perform introspection (called "reflection") on the compiled program to discover all these bits and pieces. Many IDEs use reflection to offer you, as you type, various choices of methods, variables etc. I suppose that's a kind of predictability.

Eiffel lets you overlay a framework of assertions of function pre- and post-conditions, which gives you nice runtime predictability with regard to avoiding race conditions, deadlocks etc.

One thing thats not predictable with Java is garbage-collection of deallocated memory, which can kick in at all sorts of unexpected times and stop everything. For that reason, Java is not used for real-time control of critical systems, since the optimality of the garbage collector algorithm cannot be formally proven.

Bla bla bla. Break over, back to work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.