DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: What's your Programming Language?  (Read 75,147 times)

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: What's your Programming Language?
« Reply #50 on: November 14, 2009, 04:34 PM »
My favorite programming language is Java.
Oh God why?  ;D

It's a bit like C/C++ in many ways.
... except that you can write efficient and fast code in C++.
You'd be surprised how having one thread dedicated to code optimization (speculative execution, caching of frequent objects and stuff like that) can help the performance of your code ;)
During a project for university, a friend of mine has tested C vs Java for dynamic function calls, memory allocation (and access) and native function calls. C only got the best results for native function calls.
I'm not a hardcore fan of Java, but I've been using C++ for work for the last year and a half, and I have already regretted quite a few times not having selected Java for the project.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #51 on: November 14, 2009, 05:51 PM »
Java might have a garbage collector, but its major disadvantage is that you just can't collect garbage yourself, so it tends to memory hogs of a quite notable amount.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: What's your Programming Language?
« Reply #52 on: November 14, 2009, 06:51 PM »
Java might have a garbage collector, but its major disadvantage is that you just can't collect garbage yourself, so it tends to memory hogs of a quite notable amount.
That does not mean that you can't write "efficient and fast code" in Java, it just means that it may use more memory. On the other hand, the JVM can do stuff like copy-on-write, which may even cause a lower memory usage than a C++ program.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #53 on: November 14, 2009, 06:54 PM »
it just means that it may use more memory
That's what I call inefficient.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: What's your Programming Language?
« Reply #54 on: November 14, 2009, 09:54 PM »
it just means that it may use more memory
That's what I call inefficient.
Hmm, since Java *may* use less memory than C++, and *may* run faster than C++, does that mean C++ is also an inefficient and slow language?
Or better yet, as Assembly is always faster and uses less memory than both C++ or Java, does it make both languages inefficient and slow?

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #55 on: November 14, 2009, 09:58 PM »
Hmm, since Java *may* use less memory than C++
... if you don't count the VM ...

, and *may* run faster than C++
... once the VM has started ...

See?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: What's your Programming Language?
« Reply #56 on: November 14, 2009, 10:02 PM »
jgp, there are a lot of nice things you can say about Java, but i'd love to see an example where this is true:
Quote
since Java *may* use less memory than C++, and *may* run faster than C++

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,321
    • Gathering Badge
Re: What's your Programming Language?
« Reply #57 on: November 14, 2009, 10:30 PM »
And then someone comes up with an example that proves the opposite, thereby showing how "pointful" programming language warscomparisons are...

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #58 on: November 14, 2009, 10:31 PM »
I wonder if there actually is an example.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • Plugin Coding Medal
    • Participated in NANY Challenge Once
Re: What's your Programming Language?
« Reply #59 on: November 15, 2009, 08:43 AM »
Is it that important if the program takes more or less memory? Or if it is a few percent faster or slower? Of course there are fields where this matters (scientific research and even there, they use Matlab, Python, OCaml etc. even though they are slower -> why?) but for a daily code, I do not think it really matters.

My primary decision point is how easy is to code and how I enjoy it (first order functions, pattern matching...). How the language helps you to parallelize the code, how to protect your code against bugs (units of measure, strong typing, immutability...), how to easily extend the language, how to debug (immediate scripting) it etc. And I really do not enjoy to code in C++. Java is better / simpler and and any modern functional language like F# or Scala goes even further.

PS: I do not say that C++ does not have its place but I do not understand why everybody uses it just to gain a little in memory and speed. I wonder why you do not code in assembler to gain even more speed :)
My open-source online piano game: https://github.com/musicope/game

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: What's your Programming Language?
« Reply #60 on: November 15, 2009, 09:00 AM »
I agree with you czb, for most things, the difference in speed and memory is not important.

jeremejazz

  • hey!
  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 59
Re: What's your Programming Language?
« Reply #61 on: November 15, 2009, 10:50 AM »
My favorite programming language is Java.
Oh God why?  ;D

It's a bit like C/C++ in many ways.
... except that you can write efficient and fast code in C++.

I'm curious about delphi... is it also an open source language?
Not actually. http://en.wikipedia.org/wiki/Embarcadero_Delphi

what's the difference with a scripting language and a programming language?
Scripting languages are usually made for a certain purpose.
Tuxman, Do you consider speed more important than functionality? C++ may be fast, but how functional enough is it?

JAVA may be slow but Sun is currently trying to develop a faster compiler for JAVA and the results are being seen through their updates..

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #62 on: November 15, 2009, 12:47 PM »
Where does Java provide more functionality? It doesn't even support pointers.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: What's your Programming Language?
« Reply #63 on: November 15, 2009, 02:18 PM »
Hm, the whole programming language discussion is, as always, very interesting, but imho it boils down to the simple paradigm: "Crap in, Crap out".
If one is trying to write a C style program in Java, or a huge project in i386 assembly, you should really not be surprised the end-result is not what you had hoped for.
The managed environments like the JVM and .NET advertise that they will cleanup after you leave an object-scope, but it sure makes a lot of difference in what state you leave your 'trash' behind. Setting objects to null when no longer needed in your Java or C# programs is just as effective as freeing allocated memory in your C programs, regarding the memory use.

Not every programming language is fit for every job, even if some are fit for more jobs than others. I wouldn't be writing a device driver in Java any day soon, but I would not even consider writing a GUI app in assembly language, or C (the closest thing to assembly language, imo).

For every project, there should be a clear and motivated choice for the language and libraries/frameworks used, and not try to 'fix' things later by adding other languages/libraries if the first choice happens to be 'sub-optimal'. In that case: Redo from start.

/Ath
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: What's your Programming Language?
« Reply #64 on: November 15, 2009, 02:21 PM »
Where does Java provide more functionality? It doesn't even support pointers.
It does, it only hides them from us, mere programmers.
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #65 on: November 15, 2009, 02:23 PM »
There is no way to explicitly declare pointers. In Java, everything is sort of a reference. (AFAIK.)
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: What's your Programming Language?
« Reply #66 on: November 15, 2009, 02:33 PM »
Tux: I have to ask, you have been quite vocal about your preferences of what is/isn't a programming language and the particulars of each. Do you have any examples of your work? Perhaps a sample application you can show?
Strength in Knowledge

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #67 on: November 15, 2009, 02:43 PM »
Well, I'm not that professional ...

Two of the various projects I'm regularly working on:
1) Gamers.IRC, written in a scripting language
2) eMule beba, written in a programming language

:-[
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: What's your Programming Language?
« Reply #68 on: November 15, 2009, 07:14 PM »
On the idea of different languages being suited for different tasks, that was the appeal that got me into COM.  Then the .NET promised mixing and matching to do different parts of a task in the suitable language.  Now we also have to contend with 32 bit vs. 64 bit loadable libraries or assemblies or in process servers or whatever.

Maybe what we need is JITE instead of JIT?  Just In Time Encrypted compiler.  That way you can distribute the code as compilable source without "giving it away."  The host machine knows if it is 32 bit or 64 bit and a bunch of other things about itself.  It should compile the loadable libraries and the main executables with the same Bitness and calling conventions.  No more thunks.  The program and associated libraries could be "compiled" as part of the install process.  I dunno', I'm not that far into my coffee yet so strange ideas are to be expected. :)

jeremejazz

  • hey!
  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 59
Re: What's your Programming Language?
« Reply #69 on: November 17, 2009, 03:48 PM »
Where does Java provide more functionality? It doesn't even support pointers.

Because pointers were found to be confusing and usually leads to computer crash if misused... why point something(like a variable) if you could use them directly...

jeremejazz

  • hey!
  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 59
Re: What's your Programming Language?
« Reply #70 on: November 17, 2009, 03:52 PM »
Java might have a garbage collector, but its major disadvantage is that you just can't collect garbage yourself, so it tends to memory hogs of a quite notable amount.
It seems that you are talking about destructors... well, JAVA uses the finalize() method which is similar to that

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #71 on: November 17, 2009, 04:02 PM »
Because pointers were found to be confusing and usually leads to computer crash if misused...
Have you ever worked with them? Maybe they are confusing, but very useful at times.

It seems that you are talking about destructors...
Not necessarily, delete works anywhere...
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

jeremejazz

  • hey!
  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 59
Re: What's your Programming Language?
« Reply #72 on: November 18, 2009, 05:43 AM »
Still I prefer them hidden just like what James Gosling preferred...  ;D
you seem to be a C++ expert... can you give us an important use of pointers

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: What's your Programming Language?
« Reply #73 on: November 18, 2009, 07:57 AM »
Still I prefer them hidden just like what James Gosling preferred...  ;D
you seem to be a C++ expert... can you give us an important use of pointers

One use would be implementing the language with the hidden pointers. In the beginning many of the OOP languages were just front ends that spit out C source code since C compilers were most likely to exist for the target platform.

The C++ virtual functions themselves are just a jump table of function pointers with some type checking.  And of course COM takes that to another level.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: What's your Programming Language?
« Reply #74 on: November 18, 2009, 03:10 PM »
James Gosling? That guy desecrated Emacs, so I basically like him.  :P

"Hidden pointers" are no pointers.
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Original address: https://www.donationcoder.com/forum/index.php?topic=20400.0