[neomutt-devel] Fwd: Re: which language for object orientation? Was: To fork or not to fork?

toogley at mailbox.org toogley at mailbox.org
Thu Jan 26 18:15:32 CET 2017


Hm, sorry. I keep forgetting that i have to reply to the group...

> ---------- Original Message ----------
> From: toogley at mailbox.org
> To: Guyzmo <z+mutt+neomutt at m0g.net>
> Date: January 26, 2017 at 6:13 PM
> Subject: Re: [neomutt-devel] which language for object orientation? Was: To fork or not to fork?
> 
> > > Would it a sensible idea to use lua for that purpose?
> > > https://en.wikipedia.org/wiki/Lua_%28programming_language%29#Object-oriented_programming
> > 
> > not really, it's possible to implement a pretty decent object oriented
> > paradigm in pure C, when it matter. 
> > 
> > Actually, the way it's currently implemented /is/ an OO design pattern,
> > the Strategy Pattern¹, where you've got the `struct mx_ops` acting like
> > an interface, each mailbox specialisation implementing that interface by
> > assigning function pointers callbacks. It's just done without any
> > syntactic sugar and type safety, like the ones provided by C++ classes.
> 
> I agree with you - However, I don't look just at the obeject orientation. I'm very interested (in this context, especially) in the language which implements it. If C and lua have the same abilities of implementing OO but lua would have the better type system - i would suggest using lua for impmententing OO.
> 
> For Example: As far as i understand is, among other things, C weakly typed because it provides very few protections of e.g. buffer overflows and such. I'm not sure if lua is better in that regard?
> 
> As lua is written in C, of course its implementation is risky to buffer overflows[0] - but i don't know if the probability to get a buffer overflow is lower compared to C.
> 
> And i still think using Rust could be a serious alternative some day. I understand it may be less newbie friendly, but i like the stability and security warranty a lot.
> 
> 
> [0]: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-5461


More information about the neomutt-devel mailing list