DEV Community

Discussion on: Should I learn Go?

Collapse
 
alchermd profile image
John Alcher

Interesting. Can you give some example of Go's restrictive syntax compared to C?

Collapse
 
tux0r profile image
tux0r
if (something)
{

This won't work in Go.

Thread Thread
 
theodesp profile image
Theofanis Despoudis

That won't work in C either:

#include<stdio.h>

typedef enum { false, true } bool;

int main() {
   bool isOk = true;

   if isOk {
       printf("Its ok");
   }
}

So it's subjective at the end of the day.

Thread Thread
 
tux0r profile image
tux0r

C allows you to format valid syntax freely. Your example is not valid syntax.