News for hackers. Stuff that matters.
Re:55 GiB/s FizzBuzz (2021) by _dain_ on Monday July 03, 2023 @06:43AM (#36571132)
>Object-Oriented Assembly

what in the god damn

Re:55 GiB/s FizzBuzz (2021) by nickelpro on Monday July 03, 2023 @09:28AM (#36572577)
vtables aren't limited to any particular language

That you have some set of macros that work on common data structures and use a function pointer lookup to dispatch some behavior isn't insane. I mean, if your macros are that advanced why not use a real programming language, but shit got weird in the 80s and early 90s.

Re:55 GiB/s FizzBuzz (2021) by jerf on Monday July 03, 2023 @10:00AM (#36572975)
Paradigms are not a characteristic of programming languages, they are a characteristic of programs.

Now, obviously, programming languages encourage and afford the use of certain paradigms. But that's all they do. A program is not object oriented because it's written in C++. It is object oriented because it is written in terms of objects, regardless of what the underlying language may support or encourage.

Assembly, being the base language of the CPU, can be written in any paradigm any other language might permit, since all other programming language paradigms are obtained as limitations on the underlying assembler that may be generated. You can always just apply those limitations manually to get an object oriented program, or a logic programming program, or a functional programming. It just might be very costly and difficult.

Re:55 GiB/s FizzBuzz (2021) by dahart on Monday July 03, 2023 @11:11AM (#36574020)
Haha! This is a real thing. “It is easy to assume that OOP requires such an OOP language. This is not the case.” https://zsmith.co/OOA.php

https://www.amazon.com/Object-Oriented-Assembly-Language-Len...

Indeed, my first industry job, after spending my undergraduate and graduate degrees honing C++ skills, was doing object oriented C. It was actually great, taught me a lot about what actually matters in a language versus what people will tell you.