Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Dylan (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Extensibility== This whole concept might strike some readers as very odd. The code to handle <code>to-string</code> for a window isn't defined in <code><window></code>? This might not make any sense until you consider how Dylan handles the call of the <code>to-string</code>. In most languages{{which|date=June 2013}} when the program is compiled the <code>to-string</code> for <code><window></code> is looked up and replaced with a pointer (more or less) to the method. In Dylan this occurs when the program is first run; the [[Run time system|runtime]] builds a table of method-name/parameters details and looks up methods dynamically via this table. That means that a function for a specific method can be located anywhere, not just in the compile-time unit. In the end the programmer is given considerable flexibility in terms of where to place their code, collecting it along class lines where appropriate, and functional lines where it's not. The implication here is that a programmer can add functionality to existing classes by defining functions in a separate file. For instance, you might wish to add spell checking to all <code><string></code>s, which in C++ or Java would require access to the source code of the string class—and such basic classes are rarely given out in source form. In Dylan (and other "extensible languages") the spell checking method could be added in the <code>spell-check</code> module, defining all of the classes on which it can be applied via the <code>define method</code> construct. In this case the actual functionality might be defined in a single generic function, which takes a string and returns the errors. When the <code>spell-check</code> module is compiled into your program, all strings (and other objects) will get the added functionality.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Dylan (programming language)
(section)
Add topic