Live data from Hacker News

C (Cbang) - A system oriented programming language

blog.lse.epita.fr

61–70 of 86 posts

Re: C (Cbang) - A system oriented programming language

#61
post #13
post #6

How about a few more default data structures, like resizable arrays or hashes? I find the biggest bump in my productivity in most other languages is that those two things are there already.

The problem is dynamic memory allocation. It's actually one of the gripes I have with the "rust" language [1]. As a C coder I find it hard to take seriously a language that don't let me customize memory allocation easily. It's not impossible to do right though, C++ has "allocators" parameter templates to do exactly that (there's a default implementation that you can "override" with a custom class). [1] https://news.y…

That's why I mentioned "default". If you have more specialized requirements, you can write your own version. :)

Re: C (Cbang) - A system oriented programming language

#62
C++ is perfectly fine for operating systems. Actually its probably better. Here in UFSC(university of santa catarina), LISHA(hardware/software integration lab) has created EPOS, an embedded operating system, that runs on arm, x86, powerPC, Mips. The problem most of the times of using C++ is the lack of software engineering knowledge. EPOS is open source, and its code is actually readable. http://epos.lisha.ufsc.br/ for more information.

Re: C (Cbang) - A system oriented programming language

#64
post #57
post #53

Earlier quoted context omitted.

Objective-C was not created by Apple.

It has created by NeXT, which was bough by Apple, thus Apple holds the language copyright.

It was not created by NeXT: https://en.wikipedia.org/wiki/Objective-C#History

There's no such thing as language copyright.

Re: C (Cbang) - A system oriented programming language

#65
post #50
post #10

Earlier quoted context omitted.

Sounds like what you're looking for is the original Bash source code, circa 1977, for example [1]: LOCAL STRING copyto(endch) REG CHAR endch; { REG CHAR c; WHILE (c=getch(endch))!=endch ANDF c DO pushstak(c|quote) OD zerostak(); IF c!=endch THEN error(badsub) FI } Applicable macros if you want to give your code that classic ALGOL 68 smell in [2]. [1] http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/... [2]…

Hate to be pedantic, but that's the Bourne shell, not bash.

Yup, totally correct and really not that pedantic. I realized that about two hours later when I reviewed my own comment and promptly punched myself…

Re: C (Cbang) - A system oriented programming language

#66
post #13
post #6

How about a few more default data structures, like resizable arrays or hashes? I find the biggest bump in my productivity in most other languages is that those two things are there already.

The problem is dynamic memory allocation. It's actually one of the gripes I have with the "rust" language [1]. As a C coder I find it hard to take seriously a language that don't let me customize memory allocation easily. It's not impossible to do right though, C++ has "allocators" parameter templates to do exactly that (there's a default implementation that you can "override" with a custom class). [1] https://news.y…

The STL's templatization over allocators is over allocator class, not allocator instance which makes them effectively useless IMO.

Re: C (Cbang) - A system oriented programming language

#67
post #64
post #57

Earlier quoted context omitted.

It has created by NeXT, which was bough by Apple, thus Apple holds the language copyright.

It was not created by NeXT: https://en.wikipedia.org/wiki/Objective-C#History There's no such thing as language copyright.

A programming language is under copyright of the creator. , which can decide to put it in public domain, standardize it, give an open source license to it, whatever.

While NeXT did not exactly created Objective-C, it acquired a license to be able to create their own implementation, which became the official Objective-C compiler.

Plus, lets see what is the outcome of the Oracle vs Google trial regarding copyright.

Re: C (Cbang) - A system oriented programming language

#68
post #3

I think that languages that are a just thin shell on top of C (as opposed to languages that merely target C, e.g. Chicken Scheme) might have some potential. I'll call this coffeescriptification --still eagerly awaiting the first transpiled language that does nothing but remove C's braces and semicolons. If someone doesn't do it by next April Fools, I certainly will (I already have the name in mind: Glee (the italics…

One thing often overlooked in language design is the filename. It's 2012, why are languages still stuck with IBM-era filename extentions when they could use unicode?! For instance: Rust: filename.ℛ Java: filename.☕ Glee: filename.☺ Isn't that just so much clearer and nicer-looking than ".rs" or ".java" or ".g"? It's really the fine aesthetic points like this that can make or break a language.

It's not clearer at all for me, especially when some of these characters won't render reliably on several platforms (for instance, the java char isn't showing in this browser right now).

Extensions and filenames can be made not to be so central, which I'd consider a more reasonable development over superficial silly hacks like that. This is IDE domain, definitely in 2012 and for years to come.

If you want to render your extensions to funny happy Unicode symbols in your specific purpose file manager, then fine by me. Actually storing filenames like that would just make you a number of new enemies.

Re: C (Cbang) - A system oriented programming language

#69
post #29

I'm surprised of no mention of Bliss. Nice low-level DEC-10 language, later generalized a bit.

I remember reading about it in an article by Olin Shivers (the history of T, at http://www.paulgraham.com/thist.html ). After reading the wikipedia page about it, it doesn't seem to be available for any common platform. How would it perform as a system programming language today (compared to C) ?

It would work fine. It had bit-level operators, easy assembler integration, simple macros. Decent looping constucts after the first version. Everything was an expression which makes lots of things easier and a good optimizing compiler (rember Wulf?). It did have a major quirk: you had to be explicit on addresses vs. values. To get a value you put a '.' in front of an address. Used to drive some people crazy, but I never had any problem (much) with it.

Re: C (Cbang) - A system oriented programming language

#70
post #67
post #64

Earlier quoted context omitted.

It was not created by NeXT: https://en.wikipedia.org/wiki/Objective-C#History There's no such thing as language copyright.

A programming language is under copyright of the creator. , which can decide to put it in public domain, standardize it, give an open source license to it, whatever. While NeXT did not exactly created Objective-C, it acquired a license to be able to create their own implementation, which became the official Objective-C compiler. Plus, lets see what is the outcome of the Oracle vs Google trial regarding copyright.

A programming language is under copyright of the creator. , which can decide to put it in public domain, standardize it, give an open source license to it, whatever.

Implementation -- yes, the language itself -- no.

Post reply on HN