DEV Community

Andrey Frolov
Andrey Frolov

Posted on

 

Look into base types

So nothing special here

There are bunch of data types:

  • floats

Numbers with a floating point

1.1
1.2
Enter fullscreen mode Exit fullscreen mode
  • ints
300_000
1
Enter fullscreen mode Exit fullscreen mode

OCaml as ruby, elixir does, allow you to place underscores in the middle of numeric literals to improve readability. Note that underscores can be placed anywhere within a number, not just every three digits.

  • booleans
(1 < 2) = false;;
Enter fullscreen mode Exit fullscreen mode
  • chars
"a";;
Enter fullscreen mode Exit fullscreen mode
  • strings (immutable)
"Hello";;
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
yawaramin profile image
Yawar Amin

Hello, char type uses single quote: 'a'.

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git