User: Password:
|
|
Subscribe / Log in / New account

GNOME Platform Stormclouds

GNOME Platform Stormclouds

Posted Mar 27, 2004 7:42 UTC (Sat) by Cato (subscriber, #7643)
In reply to: GNOME Platform Stormclouds by tjc
Parent article: GNOME Platform Stormclouds

For (some) static checking in a dynamic language, try Perl - most code is written with 'use strict', which catches variable name typos although the type checking is still done at run time.

Or you can just use OCaml (Objective Caml), which is garbage collected and dynamic like Perl/PHP/Tcl/Ruby/Python, but also has strong inference-based type checking (somewhat like C/C++/Pascal, except that you never have to declare types - it just infers all types, working up from the constants and operators). OCaml is almost unique in having the ease of programming of a dynamic byte-code interpreted language (a la Perl) and the option to compile to truly efficient machine code (which is sometimes faster than C, due to more optimisation enabled by stronger type checking, see link above for details). Well worth a look.


(Log in to post comments)

GNOME Platform Stormclouds

Posted Mar 27, 2004 10:30 UTC (Sat) by mly (guest, #2171) [Link]

Or you can just use OCaml (Objective Caml), which is garbage collected and dynamic like Perl/PHP/Tcl/Ruby/Python, but also has strong inference-based type checking...

I realize that this helps improve performance, but does it prevent spelling errors?

GNOME Platform Stormclouds

Posted Mar 28, 2004 6:40 UTC (Sun) by Cato (subscriber, #7643) [Link]

Yes, OCaml prevents spelling mistakes in variable names and any type mis-matches, just like C/C++ type checking. In addition, it can also catch more subtle errors - my OCaml page (see original post) has a link to an example where a similar language's compiler detected an infinite loop at compile time


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds