Hi,
On May 28, 2:02 pm, navin syde <
navin.s...@gmail.com> wrote:
>
> I've this idea about a new language which has the following
> capabilities:
Uh oh, sounds like design by committee. ;-)
http://xkcd.com/927/
> ** general purpose - you learn one language to do most of the things
> 1) system programming - can implement real time systems, OSes, etc.
C, Modula-2, Oberon, Modula-3
> 2) client/server side programming
Dunno exactly what this means, networking?? Java, Modula-3
> 3) embedded system programming, for mobile devices. phones, set-
> top boxes, micro-controllers etc. (like embedded c; or java ME)
C, Forth, Oberon (or embedded into apps, e.g. Lua, Tcl, Rexx)
> 4) web-programming - can use scripting variant of the language for
> this; will comes with a web-framework (like PHP, Ruby/Grails, etc)
HTML5/JS, Java
> 5) parallel/cluster programming - super computing platforms - like
> HPC
Fortress, Go
> 6) must have OO capabilities
(puke) Don't they all these days? It's practically mandatory (sadly).
But, IMHO, it shouldn't be forced in every situation. Similarly
Unicode, multithreading, etc. Nice (I guess) but overkill for some
cases.
> 7) UI programming - comes with a platform independent UI framework
> for major platforms
Various C/C++ toolkits have been ported, but usually it neglects
anything that isn't "heavyweight desktop" or similar. It would be
interesting to know what "bare minimum" would be considered
acceptable.
> 8) etc.
>
> ** highly portable - source & binary (yes, at least on to main
> platforms as single executable with different run-times - either as
> fat binary, or binary with accompanying run-time for each platform);
> see java & .NET does a trick, as they supply the VMs (the run-time-
> platform) prior to the programs; they say language is portable. but
> really not - you need to have the VMs ported on the platform first.
Nothing is ever "by default" portable anyways, just hidden behind
different layers. Having a VM is just a standard backend that is
(hopefully) easier to port to, e.g. see Pascal (pcode -> P4) and
Modula-2 (mcode -> M2M-PC), which predated and inspired Java.
> ** run on bare metal - i.e. compiled so it is faster than any language
> on a VMs - not having JIT compilers
Anything (almost?) can run native, even Rexx, BASIC, Java, etc.
"Faster" is an implementation issue, almost never determined by
language spec itself.
> ** can consume libraries from various languages - libraries from java
> - but without a VM, bytecode should be able to be invoked or
> translated and linked to the binary; libraries from C/C++ etc.
So far, that's been very difficult, esp. since different calling
conventions are used. "cdecl" seems to be considered
pseudo-"universal" these days, and I guess that's as good as you can
hope for. Some languages (or tools) do a better job at "interfacing"
than others.
> questions are:
> - How easy to design a language like this?
If it was easy, there wouldn't be so many (nor different parsers,
etc). You can always try again, but "those who forget history are
doomed to repeat it".
> - Are there any example languages like this, that have already built?
I don't think "one language to rule them all" exists, but most people
seem to prefer only one or two languages. Judging by statistics, it
seems C/C++/Java are the big dogs these days, but a few others (and
various scripting ones) still exist in some corners too. I don't think
you can please everyone.
> Also looking forward your expert help on designing such a language.
Heheh, ugh, unlikely!
P.S. Not saying that no language fits these requirements, some will
probably (mostly) correctly point out various ones that already do
(more or less) all of the above, e.g. Oberon, C/C++, Ada, FreePascal,
FreeBASIC, Java, or whatever. You can pretty much make any language do
whatever you want. It's up to "critics" to determine how well (or
little) it satisfies their goals (if at all). It's easy (cheap) to
call a language a "failure" instead of admiring its successes. Also
talk is cheap ("use the right tool for the job"), esp. with so many
implementation difficulties (mostly for polemic reasons). So I dunno,
honestly, it's a big mess. But indeed, some seem better than others
(but it depends on your own skills, needs, wants, etc).