|
Let's hear about your favourite language(s) and why. Alternatively, tell everyone else why their language sucks. Give proper reasons, and post a link if it's some obscure indie language.
I'll start with Rust:
- Guaranteed compile-time memory safety, without a GC (unless you don't want that).
- Compiles to machine code.
- Zero-cost abstractions such as algebraic data types, closures (and HOFs), operator overloading, and loads more I will have forgotten.
- No concept of null.
- Utterly superb macro system, resulting in e.g. compile-time SQL query validation, as well as compiler plugins.
- First-class unit testing.
The Rust Programming Language
Rust is cool and all, but, sorry...you just can't beat LOLCODE.
- Its awesome.
- 6 easy to remember types: YARN (string), NUMBR (integer), NUMBAR (float), TROOF (boolean), BUKKIT (array) and NOOB.
- Only a few ways to compile so you can spend your time coding LOLCODE.
- Its lol cats.
- Its awesome.
Working example:
LOLCODECode:I HAS A COLOR ITZ "GREEN" COLOR, WTF? OMG "RED" OMG "YELLOW" VISIBLE COLOR " FISH", GTFO OMG "GREEN" VISIBLE "FISH HAS A FLAVOR", GTFO OMGWTF VISIBLE "FISH IS TRANSPARENT" OIC
What do I win?
Brainfuck is even better then Rust, LOLCODE, and any other programming language.
- Fucks you in the head.
- Makes your knowledge in mathematics better.
- Okay maybe LOLCODE is better.
Working Example:
Code:++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
You win a lolcode compiler written in Rust!! (Only half complete by the look of it)
Proof that Rust has a turing-complete type system (uses Brainfuck)
I'm pretty sure this wasn't intentional; interesting how you can accidentally end up with a turing-complete language.
Also a Brainfuck interpreter is a very simple but fun project, give it a try if you haven't before.
Kids, its obviously ASMJS
Code:function strlen(ptr) { // calculate length of C string ptr = ptr|0; var curr = 0; curr = ptr; while (MEM8[curr]|0 != 0) { curr = (curr + 1)|0; } return (curr - ptr)|0; }
- Ensure that ptr is always an integer
- Read an integer from address curr
- Additions and subtractions are all 32-bit
- no variables with mixed types,
- low-level assembly-like computation
Nothing better
My language is the grand-daddy of all your silly little programming languages, without it none of yours would even exist!
Ladies and gentlemen, to thee, I present...
Assembly
- It's mainly what your high-level languages use to talk to the computer
- It's just high enough of a low-level programming language to actually still be readable
- There are almost ZERO limits with it.
- I don't understand it, very well.
Code Example (x86 Windows):
Code:.486p .model flat,STDCALL include win32.inc extrn MessageBoxA:PROC extrn ExitProcess:PROC .data HelloWorld db "Hello, world!",0 msgTitle db "Hello world program",0 .code Start: push MB_ICONQUESTION + MB_APPLMODAL + MB_OK push offset msgTitle push offset HelloWorld push 0 call MessageBoxA push 0 call ExitProcess ends end Start
All great suggestions (Mostly LOLCODE), but obviously there's one better than all... BeamScript(2)!
Advantages:
- It's a private language, made by me, so you'll never know for certain if and what any disadvantages are.
- It allows me to be a lazy bastard when it comes to web development.
- It beats JSP, PHP and ASP in performance in equivalent test cases (main benefit is database integration)
- Application, Session and Page level variable support.
- Libraries handled differently to pages, Support for both BeamScript(1 legacy mode/2) libraries and Java (classes).
Disadvantages:
- You'll never know...
Example Code:
The above code is used to produce the following page:Code:<script server> loadLib("db"); loadLib("gauth"); loadLib("template"); loadLib("server"); loadLib("widget"); renderPage("portal", { breadcrumbs: ["RuneBeam"], renderRight : function(open, close) { renderWidget("topservers", open, close); renderWidget("categories", open, close); }, header: function() { }, navigation : MENU_LINKS, rightNavigation: RIGHT_MENU_LINKS, featured: GetFeaturedServers(5), banner : GetSponsoredServers(), newServers : GetNewServers(5), top : GetTopServers(5), }); </script>
Syntax-wise, it's based off JavaScript, however it's compiled. It's also inlined with HTML, making it easy to make webpages in it (it takes <script> tags with the "server" parameter as server-sided code).
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |