logo       

RE: How do you choose your programming language ?: msg#00077

culture.hackers.israel

Subject: RE: How do you choose your programming language ?

I think that because I discussed a few month ago with shlomi about
the benefits of java you were unknowingly biased to think that is the only
language of choice I advocate.
I meant that you can use ANY higher level language that was intentionally
limited and constrained in order to avoid lower level bugs such as in C or
C++. Not so weird, pascal was actually built originally for students to learn
programming concepts and because of that it should be inherently safer than
C. However, we all know that even in pascal you can circumvent safeguards as
part of the language and so the most restricted language I know that
is widely used is JAVA.

Btw, regarding the C system calls you sometimes have to use in JAVA, even makes
my case stronger. If you have to get to the C system calls, than you either
should
have used a lower level language or find a java librarly. Either way this place
where
you have to use the call is probably a dangerous place for bugs and thus when
you
call just it you can control the number of errors from it.

If you really don't like JAVA performance there are native compilers now that
should
work most of the time, hopefully it will tell you when it can't :) but I
wouldn't like to
find it out after distribution.

I think that there were attempts to make a variant of C with as many safeguards
as possible but I don't remember the name. However, C as is can never be a part
of
RAD family which is what an organization would probably use to develop end user
apps. I.e. time to market is everything today.

I know it feels strange for a technical discussion to sudenly talk about
marketing
strategies and costs but that's the way these things goes.
Its all about the money.

Of course if we are talking about a BSD style FOSS(no arguing that BSD!=FOSS) or
GPL end user app (no library style licensing) FOSS project than do what you
want.
Have fun with C, I know I did :) (not to mention P langs :)

P.s.: I LOVE PASCAL,DELPHI,C. which has nothing to do with my end decision.

Regards,
tzahi.

> -----Original Message-----
> From: hackers-il-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx
> [mailto:hackers-il-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx] On Behalf Of
> Nadav Har'El
> Sent: Wednesday, November 23, 2005 11:04 AM
> To: hackers-il-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx
> Subject: Re: [hackers-il] How do you choose your programming
> language ?
>
> On Tue, Nov 22, 2005, Tzahi Fadida wrote about "RE:
> [hackers-il] How do you choose your programming language ?":
> >...
> > Anyway, all of these worth nothing if the software is
> distributed and there is a major
> > recall because of bugs such as range checks rouge pointers,
> etc... the usual...
> > Better use a high level language that restrict more than
> being flexible and even less
> >...
>
> In theory, you are right, and such reasons are always quoted
> for why Java
> is better than C.
>
> But while in theory, theory and practice are the same, in
> practice, practice
> is often different from theory :)
>
> What I mean is that often a program gets written in, say,
> Java, and while it
> results in a program that has fewer bugs - it often results
> in a program that
> is utterly unusable, because it takes up tons of memory
> ("don't worry, just
> upgrade your memory to 1GB" is something I often hear in the
> context of Java
> programs), or other performance issues. On more than one
> occasion (dare I
> say, "every occasion"?) when a Java project or program is
> complete, the
> people involved say, "This product has a great potential, but
> if it were
> written in a different language, perhaps we could actually use it."
>
> And I'm saying this is a person who currently programs in
> Java for a living (!).
>
> So while when you say "C is better in performance" people always think
> "I don't care because I don't mind if my program is 10% slower, or the
> GUI takes 10 milliseconds instead of 1 milliseconds to
> update", you can't
> neglect it altogether. A 5-fold memory usage increase, a
> 5-fold slowdown
> in CPU-intensive applications, pauses (for garbage-collection
> or swapping)
> during interactive applications - these things are NOT
> ACCEPTABLE. And in
> some languages (especially Java) and some cases, they are
> nearly unavoidable.
>
> Since my vents are already open ( :-) ), let me say what
> really bothers me
> about Java, and its concept of garbage collection.
> Java basically assumes that by the time of garbage
> collection, most of the
> objects in memory are garbage, and its GC algorithms handle
> this case very
> efficiently. It is almost always the case, because Java
> encourages you to
> create many transient objects that live for very short durations.
> So Java programs typically allocate a (very) large heap, and
> just go over
> it giving out memory until the heap is all finished, at which
> time garbage
> collection is done (very efficiently - forget the details for now).
> The problem is that this process is very good when the Java
> virtual machine
> is given the machine's entire memory (Linux kernel hackers:
> this is exactly
> like the Linux kernel always tries to fill up the entire
> memory with buffers
> and caches). So Java is ok for running a single huge
> application on some
> machine. But as soon as we start running several separate
> JVMs (namely,
> different Java-written utilities) on the same machine, things
> get hairy.
> You can't let each Java program use 1 GB of heap, because
> even if it needs
> just 50 MB, it will REALLY USE that 1 GB. So you need to
> either allow the
> program to use tons of memory (ever used Eclipse? it's really
> notorious in
> this regard) or artificially limit the heap size of the
> program, causing
> horrible crashes when the heap really runs out because the
> program really
> needs more memory. Sun's JVM (but not IBM's!) knows to shrink the heap
> to a size more similar to the real size needed, but it still
> doesn't do
> this effectively, and it always uses up much more memory than
> the program
> really needs.
>
> So in short, performance is *always* an issue: nobody cares about 10%
> speedups, but people always care whether a utility takes 20
> MB of memory
> or 200 MB of memory (these are actual numbers from a comparison of one
> C program and a similar Java program we did at work).
>
> --
> Nadav Har'El | Wednesday, Nov 23
> 2005, 21 Heshvan 5766
> nyh-TS7m/3hpY0sOpacJJkBjfT4kX+cae0hd@xxxxxxxxxxxxxxxx
> |-----------------------------------------
> Phone +972-523-790466, ICQ 13349191 |The trouble with being
> punctual is that
> http://nadav.harel.org.il |nobody is there to appreciate it.
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> 1.2 million kids a year are victims of human trafficking.
> Stop slavery.
> http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/saFolB/TM
> --------------------------------------------------------------
> ------~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>




------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/hackers-il/

<*> To unsubscribe from this group, send an email to:
hackers-il-unsubscribe-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise