Home | About | Partners | Contact Us

SourceForge Logo

Quick Links
Home
News
Status
Building XL
XL Mailing List

Understanding XL
Conceptual overview
XL examples
Inside XL
Concept Programming

In depth
Browse GIT
Bugs
SourceForge Info
Contact

Other projects
GNU Project
The Mozart Project

XLR: Extensible Language and Runtime

The art of turning ideas into code

Semantics

Prev: Syntax

Up

Next: XL as a data language

Semantics define the meaning of the program, in other words those aspects of the code, which are not directly visible. English semantics make "The small large rabbit compiled the cat" incorrect, even if its syntax is correct, because there are contradictions in the meaning (the rabbit can't be both large and small) and a verb that doesn't make sense (what does it mean for a rabbit to compile something?).

In most development environments, the code space is represented as text (known as "source code"), and the semantics essentially defines the meaning of syntactically valid text, if any. For instance, in C, an identifier such as Blob may denote a variable or a function, depending on previous declarations. You can use a variable in expressions, or assign values to it. You can call a function.

By extension, we can also consider semantics rules for non-textual forms of code. For instance, the fact that <FONT COLOR="#FF0000"> in HTML makes text display as red is a form of semantics. It doesn't matter if that code is being edited textually or using a WYSIWYG editor, its meaning remains the same.

For Concept Programming, one objective of well-designed semantics is to reduce semantic noise, to be easy to extend, and to be able to correctly identify and report errors.

Prev: Syntax

Up

Next: XL as a data language


Copyright 2008 Christophe de Dinechin (Blog)
E-mail: XL Mailing List (polluted by spam, unfortunately)