Favorite Programming Language?

Started by
135 comments, last by umbrae 16 years, 4 months ago
Quote:Original post by afarnen
create an implementation/compiler. To create a compiler, create a program that can translate your language's code into assembly language (or machine code).


So *every* programming language is another program's (i.e. the compiler) interpretation of assembly?
------------------------------Put THAT in your smoke and pipe it
Advertisement
Quote:Original post by Drizzt DoUrden
Quote:Original post by afarnen
create an implementation/compiler. To create a compiler, create a program that can translate your language's code into assembly language (or machine code).


So *every* programming language is another program's (i.e. the compiler) interpretation of assembly?


All you would have to do is write the documentation for the programming language, and then wait for someone to write an implementation.

An implementation doesn't have to be a compiler. That's only if it will compile into assembly language or machine code. An implementation is anything that uses the syntax that you defined in some kind of documentation.
Quote:Original post by King Mir
Quote:Original post by afarnen
I would have to say Haskell because it's just so brilliant and different from most popular languages.
My beef with haskell is that you have to separate the sequential logic and the combinatorial logic; the IO from the stateless functions. It means that if I write the quick sort algorithm to pick a the pivot point to all ways be the same index, then the algorithm can be elegantly written one way. But if I make the pivot point be a random index, the code has to be drastically changed, including how the algorithm is used.

Otherwise, I agree its an elegant language.


I don't know how to do too much with it, but what I've learned so far I love. I'm currently writing my own programming language, and it's hopefully going to be influenced by Haskell.
Quote:Original post by NickHighIQ
P.S. I know half the stuff I said about Java is not true, please do not quote me and say "Ah, but..."


Ah, but...

<insert some clever response here>

-----The real post starts here-----

Personally i don't really like any language that much, i've made most of my games using C++ (Except for some small experiments using ActionScript(Flash) and Java) but i really don't like the language that much.
For most of my recent projects (none of which has been a game) i've used Java simply because it lets me get the job done in less time), then there is ofcourse SML (The only functional language i've used properly) which is quite beatiful, but personally i prefer to only use it for stateless applications.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Quote:Original post by afarnen
Just to clear this up, don't feel that you have to put the one you use the most.
I use C++ almost entirely at work (with STL, templated metaprogramming), but all my hobby projects are in C#. Reason: The syntax is clean, it's powerful, and just a joy to code in. The newest incarnation with LINQ is even more awesome.

Ruby. It's actually structured close to the way I think.

C++ probably comes in second, just because I'm a masochistic bastard who likes to juggle template and macro metaprogramming for kicks.
Favorite: Python - mostly because I'm lazy
Least Favorite: PHP - mostly because it's what I always end up having to fix/clean up and it never seems to be used properly.
My favourite language is c++, because I can do quite everything with it and I like the fact that I have full control over the code behaviour. Every time I find some problem designing the code to get the work done in other languages, I always say "ok, I c++ I would make this way...". Don't know why, the c++ solution comes always first.
Unfortunately, it is no longer the best tool for most of the jobs I do and recently I use it only for my spare time second incarnation of my raytracer (if it will ever see the light).

I like c# very much (the language, not necessarily the .net library), and it is becoming better and more powerful at each new version.

Also python is nice, though I never used it extensively so I can't really tell.

But actually, I'm really waiting for the new c++ standard :-)
C++, mostly because it's what I learned when I moved out of QBASIC, and it supports Allegro. But next semester I'll be learning Java, and I've heard good things about a few other languages that I might teach myself in my spare time, so I can't really say I have a definite favorite language until after I try more than two.
Poor little kittens, they've lost their mittens!And now you all must die!Mew mew mew, mew mew mew mew!And now you all must die!-Pete Abrams
Quote:Original post by Drizzt DoUrden
All of these oddball language make me wonder : what is required to/how do you create your own language?


Here, in 4 steps.

Step 1: Think of the idea, figure out what features you want, design a syntax around those features. Read this post to help figure out if your idea is any good.

Step 2: Write a lexer and a parser. There are many tools to help with this step, you can opt for the established favorites lex/yacc, the newer and quite powerful ANTLR, or something else.

Step 3: Some magic happens, you take the output from the parser and use it to create some kind of internal representation. This step totally depends on what your features are. Lots of books on this topic.

Step 4: Take that internal representation and turn it into something executable. Also lots of books on this topic. You can output machine-level code, or code for an existing virtual machine (such as the JVM, .NET CLR, or LLVM), or output your own format that would be executed by your own runtime library. My choice here would be LLVM.

If you're still interested, then that site LtU has a ton of good resources and discussions.

This topic is closed to new replies.

Advertisement