News for hackers. Stuff that matters.
Re:Do I Really Need a Programming Language? by JackMorgan on Sunday December 29, 2013 @01:06PM (#6980488)
I'm curious then what you mean by semantics, like the words used for library function names? I've always equated semantics and syntax, perhaps to my detriment.
Re:Do I Really Need a Programming Language? by wonderzombie on Sunday December 29, 2013 @01:29PM (#6980588)
Syntax is the presentation layer for semantics. Semantics are the content, meaning, and/or implications for what you convey via syntax. They're largely orthogonal.

  def add(x, y):
    return x + y

  (define (add x y)
    (+ x y))
These are similar semantically -- they each define a procedure that takes two parameters, adds them, and returns that result. Hand-waving how the language is actually implemented, they're morally equivalent, anyway. But syntactically they're fairly different.

Another example: https://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_fu.... That sentence is semantically meaningless, but it has the correct syntax.

edit: fixed code formatting.