Languages worth learning...?

Programming, for all ages and all languages.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

I can't really call VB, Perl, Ruby, Lisp, and most other high level languages programming languages. They're scripting languages more than anything else. (With a few exceptions.) I'm not saying that they're not as intricate as C, for instance, or are inferior, but am suggesting that they do not compile directly to machine code
VB compiles to machine code. Theoretically you could even program an OS in it but it would be one big hell hacking at how microsoft implemented the runtime. The clones (powerbasic) would probably be easier to port.

There are oses written in lisp already.
and are therefore unpredictable
that implies that you can not rely on interpreted languages. I.e. PHP would have been dead by now.

IMNSHO scripting languages are just as much a programming language as any other. Their usability for OS development is not relevant.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Post by JackScott »

I agree with Combuster.
Wikipedia wrote: Programming languages are used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely.
A programming language is (to me) anything that makes the programmer's life easier.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Combuster wrote:
I can't really call VB, Perl, Ruby, Lisp, and most other high level languages programming languages. They're scripting languages more than anything else. (With a few exceptions.) I'm not saying that they're not as intricate as C, for instance, or are inferior, but am suggesting that they do not compile directly to machine code
VB compiles to machine code. Theoretically you could even program an OS in it but it would be one big hell hacking at how microsoft implemented the runtime. The clones (powerbasic) would probably be easier to port.

There are oses written in lisp already.
Yes, but, as you said, they rely on an often large standard library to function. There's a small line between being able to do something, and the practicality of doing something.
Combuster wrote:
and are therefore unpredictable
that implies that you can not rely on interpreted languages. I.e. PHP would have been dead by now.

IMNSHO scripting languages are just as much a programming language as any other. Their usability for OS development is not relevant.
In PHP, what does

Code: Select all

$cat = "meow";
compile to? In C, I know that

Code: Select all

cat = 123;
will roughly translate to a mov instruction. If I were to compile a PHP application, I really have no control over what my code generates, and even if I did have some knowledge, it would most probably be dozens of calls to and from the runtime. Because the language, more often than not, requires the runtime, and usually cannot run on bare hardware, I do not consider it a full blown programming language, but instead, a scripting language.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Because the language, more often than not, requires the runtime, and usually cannot run on bare hardware, I do not consider it a full blown programming language, but instead, a scripting language.
C++ depends on a runtime. Therefore C++ isn't a programming language. I suggest you choose your arguments a bit more careful.

I'll leave now since this pointless discussion will only lead to a holy war. If you refuse to call something the way the majority does then it is entirely your problem.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Combuster wrote:C++ depends on a runtime.
So does C. ;-)

I tend to distinguish between "system" languages (ASM, C, C++, ...), "application" languages (Java, VB, ...), and "scripting" languages (Perl, PHP, ...). I admit it gets fuzzy around the edges, but I'd never get so far as to deny e.g. VB the status of "programming" language. Whether I'd use it voluntarily is another matter. ;)
Every good solution is obvious once you've found it.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Combuster wrote:
Because the language, more often than not, requires the runtime, and usually cannot run on bare hardware, I do not consider it a full blown programming language, but instead, a scripting language.
C++ depends on a runtime. Therefore C++ isn't a programming language. I suggest you choose your arguments a bit more careful.

I'll leave now since this pointless discussion will only lead to a holy war. If you refuse to call something the way the majority does then it is entirely your problem.
I do realize that both C\C++ have a runtime, but they are small (For the most part.), and in C and most of C++, the core language does not depend on them.

If VB is truly a programming language, then so is Perl, PHP, Ruby, and Python, as they all can be compiled. What then, is a scripting language?
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
JackScott
Member
Member
Posts: 1031
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Post by JackScott »

Perhaps they are a subset of programming languages? Why do they have to be mutually exclusive?
Crazed123
Member
Member
Posts: 248
Joined: Thu Oct 21, 2004 11:00 pm

Post by Crazed123 »

C# is really a Delphi successor with C-like syntax. M$ actually hired away the chief architect of Delphi to design C#.

Bastards.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Alboin wrote: In PHP, what does

Code: Select all

$cat = "meow";
compile to?
It'll equivalent of C's strcpy or C++'s std::string::operator =. C and PHP also handle variables differently. In C, variables are references to a point in memory, and you cannot change their type once you define it (well, there is type casting). In PHP, the interpreter keeps a list of variables, along with their name, value, and the sort of data they hold (array, text, or numeric), and you can freely convert data between different types, or append an unlimited number of characters on to the end of a string after it has been defined, because in PHP it is up to the interpreter to handle memory management, not the programmer (this is somewhat easier in C++ with the use of streams and strings).
My OS is Perception.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

All true, but it does mean that, to use e.g. Perl in systems programming, you'd either have to cripple the language (effectively using a "custom" language, IMHO A Bad Thing (tm)), or live with the fact that you simply cannot trust even the effective address of a value to stay the same...
Every good solution is obvious once you've found it.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Maybe a pointer goes by some internal ID rather than memory address?
My OS is Perception.
Post Reply