3 ms·
You miss the point. Yes, C isn't perfect when it comes to handling strings, but any halfway decent editor isn't based around having a single giant string in-mem
by JoachimSchipper 17y ago
You miss the point. Yes, C isn't perfect when it comes to handling strings, but any halfway decent editor isn't based around having a single giant string in-memory anyway. C and Erlang can do just fine if you have, say, a tree of (length, data) tuples, with e.g. a couple of "shadow trees" for undo. C will be somewhat faster and lighter, and Erlang has automatic memory management, but there's no particular reason why either wouldn't work.
- DougBTX 17y agoTrue, I imagine many of the commenters discussing which language to write a text editor in do not know how to write a text editor any more advanced than notepad. Certainly I have not written one.
- amix 17y agoI think you miss my point: Comparing Erlang's string handling to one of the first mainstream languages is pretty ignorant of the evolution that has happened the last 30 years. He should compare Erlang to recent languages, before concluding that Erlang's string support is great.
- JoachimSchipper 17y agoActually, Armstrong was talking about text handling, which is not the same thing - certainly not in the context of a thread about writing an editor (in Erlang). I'm by no means an Erlang expert, nor have I ever written an editor; but I don't think it self-evident that, say, language support for regular expressions is a significant aid. (Automatic memory management may be helpful, but Erlang has that and it's not what we're talking about anyway.)