Linked by Eugenia Loli on Fri 3rd Feb 2006 19:10 UTC
General Development One of the most under-used programming techniques -- Metaprogramming -- programming with code generators or writing programs that themselves write code, has many uses in large-scale computer programming. This article shows you some tools needed to do Metaprogramming in Scheme, as well as provide several metaprogramming examples. To determine which problems are best solved with a code-generating programs, take a look at this introduction to Metaprogramming article, which teaches you why metaprogramming is necessary.
Order by: Score:
Scheme
by Knuckles on Fri 3rd Feb 2006 20:25 UTC
Knuckles
Member since:
2005-06-29

(I (Really (Really (Hate (Scheme's (Abusive (Use (of (Parenthesis)))))))))

On a more serious note, Scheme is a very interesting educational language, but I think if you try to use if for something heavier you'll go insane soon (I did).

Reply Score: 2

RE: Scheme
by marrakis on Fri 3rd Feb 2006 21:17 UTC in reply to "Scheme"
marrakis Member since:
2006-02-03

(java.IsNotAnother(good.Example())).ifDontLike(Paranthesis()).clone()

Yes Scheme is not necessary the best language for serious big project, but check at common lisp. It is used by Yahoo for their online store and by the American aviation authority for their airline planification system.

Reply Score: 3

RE: Scheme
by youknowmewell on Fri 3rd Feb 2006 21:20 UTC in reply to "Scheme"
youknowmewell Member since:
2005-07-08

Neither Scheme nor Lisp are difficult to understand or to read, unlike languages like Perl or C which are known for their obfuscating ways.

wouldYou (Type *prefer, Class &I) {
Type $use = new Different;
NewType $syntax = Different.a_kind_of?;
}

No thanks.

I find both Scheme and Lisp's syntaxes to be easy to use.

Reply Score: 3

RE[2]: Scheme
by nc3cn on Sat 4th Feb 2006 16:33 UTC in reply to "RE: Scheme"
nc3cn Member since:
2006-02-04

oh yeah!

import new

class Language:
..def __init__(self):
....print self.__class__

def language_readibility_checker(language):
..if 'Python' == language:
....print 'That's clear!'
....return new.classobj('ClearLang',(Language,),{})
..elif 'Perl' == language:
....print 'Come on, go away ;-)'
....return new.classobj('ObfLang',(Language,),{})
..else:
....print "No idea what you're talking about"
....return new.classobj('ProbObfLang',(Language,),{})

MyLanguage = language_readibility_checker('Python')
ml = MyLanguage()

Reply Score: 1

RE: Scheme
by pablo_marx on Fri 3rd Feb 2006 21:39 UTC
pablo_marx
Member since:
2006-02-03

It is used by Yahoo for their online store

No, it is not. Paul Graham/Viaweb wrote the store in LISP, and when Yahoo bought it they subsequently rewrote it in C++ and Perl. You can read about the decision to move from LISP to C++/Perl at:

http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg02367...

Reply Score: 4

Kudos to LISP
by Sodki on Sat 4th Feb 2006 02:31 UTC
Sodki
Member since:
2005-11-10

The LISP family, which Scheme is a part of, is probably the most underrated, yet most powerful programming environment ever. And it's all due to it's pure simplicity.

Reply Score: 3