Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ENTERPRISE SOULSUCKING

Name: Anonymous 2009-11-06 3:13

I spent most of my day working on a C#/ASP.NET website for one of my classes.
I only wrote about 40 lines of code; and 39/40 of those lines were for the extra credit part of the assignment, which was optional.
Feels bad, man.

Name: Anonymous 2009-11-06 5:44

>>14
A fairly annoying misconception about Lisp is that it is not "object oriented".
Lisp has one of the most advanced object systems out there, however if someone wanted to implement a simple single-inheritance system like Java or Smalltalk's, you could do it in about a page of code for the simplest version(not particularily fast, but functionality would be similar).

However, you are right, Lispers wouldn't be generating code from UMLs. Why would they? When Lisp is the original meta-programming language. You can generate code using macros (among other things). You can also generate code at runtime, compilation time, read time/etc. You can change the syntax if you wish with read macros, and so on. Basically, Lisp doesn't need to generate boilerplate code, since you can write up some code which generates code for you, and then just call it up like a simple function call. This has the advantage of properly keeping the abstraction and not having to deal with regenerating that code by hand each time, instead it generates it for you upon compilation. (Of course, if you needed to manually generate such code and insert it into your own source code(ugh), it can be done easily by calling macroexpand/macroexpand-1 (or another macro-expander) (among other methods), and just copying or inserting the code. Also editors such as Emacs provide an expansion minor mode which just shows the macro expansions by pressing a chord(like C-c M-m or C-c M-Enter, then you can press similar chords to expand pieces of code as you wish, and so on).

tl;dr - Lisp can do it, but it rarely needs it, since there's much more attractive options out there.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List