BartyDeCanter,

Take a look at what even the proposer is saying wouldn’t be allowed in:


<span style="color:#323232;"> (1) new and delete.  There's no way to pass GFP_* flags in.
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (2) Constructors and destructors.  Nests of implicit code makes the code less
</span><span style="color:#323232;">     obvious, and the replacement of static initialisation with constructor
</span><span style="color:#323232;">     calls would make the code size larger.
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (3) Exceptions and RTTI.  RTTI would bulk the kernel up too much and
</span><span style="color:#323232;">     exception handling is limited without it, and since destructors are not
</span><span style="color:#323232;">     allowed, you still have to manually clean up after an error.
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (4) Operator overloading (except in special cases).
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (5) Function overloading (except in special inline cases).
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (6) STL (though some type trait bits are needed to replace __builtins that
</span><span style="color:#323232;">     don't exist in g++).
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (7) 'class', 'private', 'namespace'.
</span><span style="color:#323232;">
</span><span style="color:#323232;"> (8) 'virtual'.  Don't want virtual base classes, though virtual function
</span><span style="color:#323232;">     tables might make operations tables more efficient.
</span>

C++ without class, constructors, destructors, most overloading and the STL? Wow.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • DreamBathrooms
  • osvaldo12
  • InstantRegret
  • magazineikmin
  • ethstaker
  • rosin
  • Youngstown
  • slotface
  • ngwrru68w68
  • everett
  • kavyap
  • mdbf
  • cubers
  • khanakhh
  • JUstTest
  • cisconetworking
  • Durango
  • GTA5RPClips
  • thenastyranch
  • tacticalgear
  • modclub
  • tester
  • normalnudes
  • provamag3
  • anitta
  • Leos
  • megavids
  • lostlight
  • All magazines