Who wants to see a C replacement?

Started by
62 comments, last by swiftcoder 8 years, 9 months ago


If I am not using THE major feature(s) of the language, the reason for switching to it in the first place, tell me pratel: why would I switch to it?

You listed some requirements in your original post. The purpose of switching language is to satisfy those requirements, nothing more.

So the real question is why would you not switch to a language that meets your requirements only because that language offers other functionality that you don't intend on using?

Advertisement
LostTime76: I'm going to just quietly suggest that you've picked the wrong community for this discussion. I suspect this will be an unpopular statement, because if there's one thing GDNet loves, it's beating the shit out of newcomers for having the gall to have opinions.


You're talking to a lot of game programmers here. Most of the community is used to thinking about a very different set of abstractions, tradeoffs, and pitfalls in selecting a programming language. I doubt the average member of this site is equipped with enough experience to actually talk about the needs of embedded development cogently. Certainly I know we have a few people who remember writing code on machines with only KB of memory, and I'm sure we have people who've done more recent embedded work. My point is that those members are going to drown in the noise from everyone else.


Heap compaction without reclamation is an alien concept for game programmers. You've encountered firsthand how difficult it is for folks here to separate the concept of compaction from reclamation. Header files are one of those things that serves many different purposes to different people, and they're obviously contentious. Type systems have evolved dramatically since the introduction of C, and what is widely regarded as state-of-the-art in type systems is a far cry from what would be useful - or practical in terms of resource consumption - in an embedded world.

And of course there are two additional schools of thought that have cropped up in this thread:
  • You don't want to change enough stuff, here, have a bunch of other changes too!
  • You want to change too much stuff, here, have a language that doesn't do what you want!
I'll be honest, my heart sank a bit when I read your OP, because I knew that it would devolve precisely into the kind of directionless "nuh uh! yeah huh!" nonsense that we've seen - despite your rather prescient injunction to not do that shit.


Please do not misconstrue what I say next as an attempt to get rid of you: I think you'd have better luck in a community dedicated to embedded development. You are of course more than welcome to stay and hang out and talk about stuff here, but I won't blame you in the least if this has been frustrating enough to say "hell with it" and move on.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Haha, you are exactly right. After last night I realized that I might actually just want to let this thread quietly die. I am not getting anywhere. That or I was going to request a mod to close it.

I found out very quickly that this was the wrong forum to post this in. That was my mistake. A lot of the responses from people are completely and utterly incorrect, but I realize that is only because they don't finely understand my problem space. Then if you apply my responses to the fact that you are talking mostly to game programmers (more generally programmers who are working on systems with tons of RAM, MMU, etc..), it makes perfect sense why I am getting a lot of the responses I am.

I will make a final statement on the heap compaction and C++ member function issue. The heap compaction and member function issue are two separate problems.

"If I have the memory to support heap compaction, then I must be able to support std::bind, because it takes less memory". I am sitting here listening to a bunch of people on this forum telling me "this is going to happen" or, "it won't work" To that, I will concede that in your eyes and with the information I am giving you, you have made a valid statement on the operation of such a heap. Unfortunately, I will not go any further in giving out information on the implementation. It does actually work very well, it does not fail. The issue lies within the manual calls to do the reference tracking. With regards to performance, allocations and de allocations are O(1). Heap compaction happens while the system is idle and therefore has no performance penalty. The compactor is incremental. This is not up for discussion. It works, period, end of story. How you 'try' and reason out the implementation because I have not given you that information is up to you. Lastly, our system does do a lot of multi threading, just on a single core at the current time.

With regards to one member who thought it necessary to write out code to show me how member functions can be used by providing a data member inside the class: Yes, this not is not a new concept to me. However, doing it that way defeats the simplicity of doing "pObj->callback = whatever. If my classes have to provide a wrapper for each and every callback like that, it is a very useless feature to me. Having to do extra tracking like this, no matter how trivial it is not an option that I can give my end users. It does not work like that where I am.

I now would like to request that this topic either be closed or deleted by a mod. This was the wrong forum to post the topic in, and I apologize for it.

Thank you


I now would like to request that this topic either be closed or deleted from a mod. This was the wrong forum to post the topic in, and I apologize for it.

No need to apologise. Had this landed in 'Mobile and Console development', it's possible it might have had a better reception - a number of us have spent quite a bit of time in exotic (read: constrained) systems.

The truth is that almost nobody does systems programming these days, outside of various OS kernel/driver teams, and a selection of embedded platforms (not necessarily widely-known embedded platforms either - 'embedded Android' and it's ilk might as well be linux PCs, by comparison). And the demands system programming places on a language are almost diametrically opposed to the features demanded of a modern high-level language...

Most programmers really, really want things like lambdas, and on a high-memory system, garbage collection is a small price to pay for the convenience. I think that the demand for a new systems programming language on the level you desire (as opposed to, say, Rust or Go, which are only nominal systems languages), is very, very low.

Edit: wasn't trying to have the last word here. Didn't realise someone else locked the thread as I was posting.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement