Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a programming language with no controls structures or operators?

Like Smalltalk or Lisp?

EDIT

Where control structures are like:

     Java                 Python               
 if( condition ) {     if cond:           
     doSomething           doSomething     
 }                                         

Or

     Java                Python                  
 while( true )  {        while True:            
     print("Hello");        print "Hello"      
 }                                            

And operators

 Java, Python
 1 + 2  // + operator 
 2 * 5  // * op

In Smalltalk ( if I'm correct ) that would be:

condition ifTrue:[
   doSomething
]

True whileTrue:[
   "Hello" print 
]
1 + 2 // + is a method of 1 and the parameter is 2 like 1.add(2) 
2 * 5 // same thing
like image 382
OscarRyz Avatar asked Apr 28 '10 18:04

OscarRyz


People also ask

Can we write a programming code without control structures?

So, without control structures, your program's code would only flow in one way, and it would essentially only do one thing over and over again, which wouldn't be very helpful. Changing what the code does based on a variable is what makes programs useful to us all!

Which is not control structure in programming?

Sorting is not a programming control structure. Control structures consist of 4 structures, they are namely else conditionals, case statements, for loops, and while loops. Control structures are used in computer programming for writing web coding such a Java, Html,c++, etc. Thus, sorting is the correct option.

Is there a programming language that can do everything?

There is no one language that is good for everything, even if you can force-fit JavaScript into the server side (Node), desktop (Electron), and mobile (React Native or PhoneGap). JavaScript is primarily for web programming, and this will never change. Programmers are polyglot because they use the best tool for the job.


1 Answers

how come you've never heard of lisp before?

like image 195
user187291 Avatar answered Sep 24 '22 22:09

user187291