Re: My thoughts on C# and gaming.
Mat Noguchi <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <D7F4D9E414140644BF099886C28C663627F4E83407@bngexchange01.bungie.bng.local> |
That whole "code is data is code is data" statement makes me barf. It would be far less misleading to say "in LISP, you have the same syntax to manipulate code and data because they have the same representation in the language." If code were actually data, you would be able to do: (defun foo (...)) (car foo) Or some crazy thing like that at runtime. (Maybe you can?) MSN -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bill Kelly Sent: Wednesday, January 27, 2010 2:01 PM To: [email protected] Subject: Re: [Sweng-Gamedev] My thoughts on C# and gaming. Emil Dotchevski wrote: > On Wed, Jan 27, 2010 at 2:26 AM, Bill Kelly <[email protected]> wrote: >>> Being able to do things like this is not what makes a language great. >>> In fact I am not sure what makes most languages great. It seems to me >>> that most languages should have been a C++ library or a LISP library >>> instead -- all other differences are primarily syntactical in nature >>> and thus not very interesting as far as I am concerned. >> >> Well, if we *truly* factor out syntax, don't we effectively end up >> with a reduction-to-Turing-machine argument? > > Are you saying that the different syntax is the most important > difference between, say 6502 assembly and LISP? Or that C++ is the > same as C because it uses the same horrible syntax? You're right, I was overstating my position when I suggested syntax alone might differentiate all languages from Turing machines. I hope the rest of my post conveyed that I think there is something more subtle going on. The proponents of Lisp (and Scheme) claim that its syntax is deeply connected to its "code is data, and data is code" nature. If we change the syntax of Forth very much, we're likely to lose the ability to self-bootstrap the language from a practically featureless kernel. If we drop certain aspects of Ruby's syntax, we'd lose the ability to implement uncluttered Domain Specific Languages in Ruby itself, which is a capability of Ruby valued by its enthusiasts. An example of a Ruby DSL, in this case an assembler for Common Intermediate Language bytecode: http://www.iunknown.com/2005/12/refining-the-ru.html require 'RbDynamicMethod' RbDynamicMethod::create_ruby_method('say_hello') do include 'System, System.Collections' ldstr 'Hello, World, int = {0}, double = {1}' ldc_i4 42 box 'Int32' ldc_r8 3.141592654 box 'Double' call 'static Console.WriteLine(String,Object,Object)' br_s 'end_of_method' ldstr 'Goodbye, World' call 'static Console.WriteLine(String)' label 'end_of_method' ldc_i4_4 ret end RbDynamicMethod::say_hello The above has the appearance of CIL assembly code, but it is pure Ruby. All of the above contributing to my feeling that syntax can be a crucial element of the nature of a language, and why I'm not able to dismiss syntactical differences as 'not very interesting'. Regards, Bill _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com