adam.chlipala.net

Comparing Objective Caml and Standard ML (opens in new tab)

Covers debian.org - 77.0 kbDiscussed on Hacker News

## Objective Caml ## Standard ML ## Syntax See this syntax comparison for more details\. ### Array/string shorthands Special syntactic sugar is defined for array and string accesses\. These operations receive no special treatment\. ``` let arr = [| 1; 2; 3 |];; let two = arr.(1);; arr.(2) 0 (* A' is signaled as an unbound constructor. *) | B -> 1;; ``` ``` datatype myType = a | b; val f = fn a' => 0 (* a' is processed as a variable. *) | b => 1; (* This case is signaled as redundant...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help