5 ms·
What features make it "higher level"? It looks like syntactic sugar on C code without any real improvements (aside from GC).
by wybiral 10y ago
What features make it "higher level"? It looks like syntactic sugar on C code without any real improvements (aside from GC).
- goldbabelfish 10y agoI believe those things are exactly what make it higher level. Unless I'm misunderstanding your question, all that makes a language higher level is the amount of abstraction between the human and the computer.
- khedoros1 10y agoWhat makes [your favorite language] "higher level"? It looks like syntactic sugar on top of assembly language. It's higher level because it provides abstractions that improve the language's expressiveness.
- shakna 10y agoI've used Cello for a few side projects, and it doesn't even really feel like C in the end. Just a few off the top of my head: * No need to specify type. Use var. * Simpler for loops * Inbuilt types for Hash Tables * File types, making file reading much easier * Function types, making it easier to pass functions around * Doctype access * Threads & Mutexes * Format strings * GC (with ability to turn C-types into Cello-types for GCing.) It is fundamentally syntax-sugar, but enough that what you end up with doesn't necessarily look like C at the end. with(f in new(File, $S("test.txt"), $S("r"))) { var k = new(String); resize(k, 100); var v = new(Int, $I(0)); foreach (i in range($I(2))) { scan_from(f, 0, "%$ is %$ ", k, v); show(k); show(v); } } (From: http://libcello.org/learn/file http://libcello.org/learn/file)
- easytiger 10y agoYou are right, it looks different: awful. It is even more cloudy than the syntax of bash.
- ckastner 10y ago> * No need to specify type. Use var. I see types everywhere; they appear to just have been moved from the left-hand side to the right-hand side? eg: var i0 = $(Int, 5); var items = new(Array, Int, i0, i1, i2);
- shakna 10y agoMmm, kinda. var i0 = $(Int, 5); i0 = $(String, "Hello"); Perfectly valid.
- easytiger 10y ago> without any real improvements (aside from GC). You've really gone down the rabbit hole if you think GC is an improvment
- nonsince 10y agoAutomatic memory management is an improvement. I prefer region-based memory management to GC but a GC is a godsend in, for example, dynamic languages where you don't want any restrictions, or functional programming where you're pretending to program for a machine with infinite memory.
- easytiger 10y agoIt is certainly not an improvement for a systems language