What was the first language to use conditional keywords? Announcing the arrival of Valued...

Check if custom CRS already exists, find EPSG

Why doesn't the university give past final exams' answers?

Translate text contents of an existing file from lower to upper case and copy to a new file

Preserving file and folder permissions with rsync

Will I lose my paid in full property

How did Elite on the NES work?

Could a cockatrice have parasitic embryos?

Can gravitational waves pass through a black hole?

Beamer - mp3 - file does not play

Co-worker works way more than he should

Was Objective-C really a hinderance to Apple software development?

Putting Ant-Man on house arrest

Raising a bilingual kid. When should we introduce the majority language?

Does Prince Arnaud cause someone holding the Princess to lose?

What happened to Viserion in Season 7?

Lazy Loading a Bioinformatic SAM record

What *exactly* is electrical current, voltage, and resistance?

Will I have to go through TSA security when I return to the US after preclearance?

Why aren't road bicycle wheels tiny?

When I export an AI 300x60 art board it saves with bigger dimensions

Can a multiclassed druid/rogue benefit from Expertise while in Wild Shape?

What's the difference between multi label classification and fuzzy classification?

Number of line in website

My admission is revoked after accepting the admission offer



What was the first language to use conditional keywords?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Why does nobody attempt to build Charles Babbage's Analytical Engine?What was the first time a programmer was able to use the well know block structure for conditional code?What was the first programming bookWhat was the first dedicated core router?Where does this esoteric Pascal operator come from?What was the first game to use humorous progress updates?What was the first intelligent digital robot?What was the first publication documenting AT&T syntax assembly language?IBM would-be purchase of CP/MWhich was the first programming language that had data types?What was the first language to offer “full” structured programming support?What was the first time a programmer was able to use the well know block structure for conditional code?












9















The if keyword is so prevalent in programming that it seems to just be part of it. However, with an integer value and a goto statement, one cansimulate the functionality of an if.



Which means it's not necessary for a language to have dedicated conditional keywords in order to achieve that functionality. Which in turn makes me think that there must have been a time before somebody created the first if to be used in a language.



So, my question is: What was the first time a language offered a dedicated keyword for conditional execution?



The word itself doesn't really matter here, it could be AS_IT_OCCURS_THAT instead of if for all I care.










share|improve this question















migrated from softwareengineering.stackexchange.com Apr 18 at 14:19


This question came from our site for professionals, academics, and students working within the systems development life cycle.














  • 4





    "However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

    – Caleth
    Apr 18 at 12:18






  • 1





    @Caleth No, I mean jumping to different line numbers.

    – R. Schmitz
    Apr 18 at 12:21






  • 1





    @HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

    – R. Schmitz
    Apr 18 at 12:27






  • 3





    The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

    – BobDalgleish
    Apr 18 at 13:41






  • 3





    "Computed goto" is actually a later development than conditional branching.

    – Mark
    Apr 18 at 20:50
















9















The if keyword is so prevalent in programming that it seems to just be part of it. However, with an integer value and a goto statement, one cansimulate the functionality of an if.



Which means it's not necessary for a language to have dedicated conditional keywords in order to achieve that functionality. Which in turn makes me think that there must have been a time before somebody created the first if to be used in a language.



So, my question is: What was the first time a language offered a dedicated keyword for conditional execution?



The word itself doesn't really matter here, it could be AS_IT_OCCURS_THAT instead of if for all I care.










share|improve this question















migrated from softwareengineering.stackexchange.com Apr 18 at 14:19


This question came from our site for professionals, academics, and students working within the systems development life cycle.














  • 4





    "However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

    – Caleth
    Apr 18 at 12:18






  • 1





    @Caleth No, I mean jumping to different line numbers.

    – R. Schmitz
    Apr 18 at 12:21






  • 1





    @HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

    – R. Schmitz
    Apr 18 at 12:27






  • 3





    The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

    – BobDalgleish
    Apr 18 at 13:41






  • 3





    "Computed goto" is actually a later development than conditional branching.

    – Mark
    Apr 18 at 20:50














9












9








9


1






The if keyword is so prevalent in programming that it seems to just be part of it. However, with an integer value and a goto statement, one cansimulate the functionality of an if.



Which means it's not necessary for a language to have dedicated conditional keywords in order to achieve that functionality. Which in turn makes me think that there must have been a time before somebody created the first if to be used in a language.



So, my question is: What was the first time a language offered a dedicated keyword for conditional execution?



The word itself doesn't really matter here, it could be AS_IT_OCCURS_THAT instead of if for all I care.










share|improve this question
















The if keyword is so prevalent in programming that it seems to just be part of it. However, with an integer value and a goto statement, one cansimulate the functionality of an if.



Which means it's not necessary for a language to have dedicated conditional keywords in order to achieve that functionality. Which in turn makes me think that there must have been a time before somebody created the first if to be used in a language.



So, my question is: What was the first time a language offered a dedicated keyword for conditional execution?



The word itself doesn't really matter here, it could be AS_IT_OCCURS_THAT instead of if for all I care.







history






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 19 at 16:50







R. Schmitz

















asked Apr 18 at 12:08









R. SchmitzR. Schmitz

1887




1887




migrated from softwareengineering.stackexchange.com Apr 18 at 14:19


This question came from our site for professionals, academics, and students working within the systems development life cycle.









migrated from softwareengineering.stackexchange.com Apr 18 at 14:19


This question came from our site for professionals, academics, and students working within the systems development life cycle.










  • 4





    "However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

    – Caleth
    Apr 18 at 12:18






  • 1





    @Caleth No, I mean jumping to different line numbers.

    – R. Schmitz
    Apr 18 at 12:21






  • 1





    @HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

    – R. Schmitz
    Apr 18 at 12:27






  • 3





    The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

    – BobDalgleish
    Apr 18 at 13:41






  • 3





    "Computed goto" is actually a later development than conditional branching.

    – Mark
    Apr 18 at 20:50














  • 4





    "However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

    – Caleth
    Apr 18 at 12:18






  • 1





    @Caleth No, I mean jumping to different line numbers.

    – R. Schmitz
    Apr 18 at 12:21






  • 1





    @HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

    – R. Schmitz
    Apr 18 at 12:27






  • 3





    The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

    – BobDalgleish
    Apr 18 at 13:41






  • 3





    "Computed goto" is actually a later development than conditional branching.

    – Mark
    Apr 18 at 20:50








4




4





"However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

– Caleth
Apr 18 at 12:18





"However, with an integer value and a goto statement"? I'm not seeing the conditional here. Are you assuming a "Jump if Zero" (or equivalent) machine instruction for the goto?

– Caleth
Apr 18 at 12:18




1




1





@Caleth No, I mean jumping to different line numbers.

– R. Schmitz
Apr 18 at 12:21





@Caleth No, I mean jumping to different line numbers.

– R. Schmitz
Apr 18 at 12:21




1




1





@HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

– R. Schmitz
Apr 18 at 12:27





@HighPerformanceMark I don't know LISP history, so this might be a later addition, but it seems to have a literal if - so yeah, that absolutely counts for this question! (But it's not the correct answer because it's already older than FORTRAN.)

– R. Schmitz
Apr 18 at 12:27




3




3





The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

– BobDalgleish
Apr 18 at 13:41





The original FORTRAN had IF (value) 10, 20, 30 which would branch to statement with label 10 if value was negative, 20 if zero, and 30 if positive.

– BobDalgleish
Apr 18 at 13:41




3




3





"Computed goto" is actually a later development than conditional branching.

– Mark
Apr 18 at 20:50





"Computed goto" is actually a later development than conditional branching.

– Mark
Apr 18 at 20:50










4 Answers
4






active

oldest

votes


















18














The Analytical Engine designed in 1837 was capable of conditional branches



From the wiki (emphasis mine):




The programming language to be employed by users was akin to modern
day assembly languages. Loops and conditional branching were possible,
and so the language as conceived would have been Turing-complete as
later defined by Alan Turing.




The wiki later provides an example of the conditional being executed (with the code represented on cards):




For example, a factorial program would be written as:



N0 6 
N1 1
N2 1
×
L1
L0
S1
-
L0
L2
S0
L2
L0
CB?11


where the CB is the conditional branch instruction or "combination card" used to make the control flow jump,
in this case backwards by 11 cards.




Ada Lovelace may very well be the first to have written a program for this machine.




Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered to be the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason.







share|improve this answer








New contributor




bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 6





    It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

    – Darrel Hoffman
    Apr 18 at 17:17











  • It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

    – bitsoflogic
    Apr 19 at 13:49






  • 1





    Either way, I figured the language was the most important thing to note for this conversation.

    – bitsoflogic
    Apr 19 at 13:50











  • And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

    – leo
    Apr 19 at 18:02



















10














Computers since ENIAC have had conditional branch instructions (like jump if zero), which means assembly languages have had such a statement since the beginning, and there is no logical reason for higher-level languages to ever have forgone using it.



While it's probably theoretically possible to make programs with just your indirect jump idea, you sort of have a chicken and egg problem where it's difficult to get the branch address into the register conditionally in the first place. Implementing a conditional branch using only indirect jumps would add several instructions every time you needed to make a choice, using precious time, memory, and registers,






share|improve this answer































    4














    The answer would, by definition, be the first programming language.



    A little bit of free CS101 here...



    All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.




    Sequence, Selection, and Iteration are the basic elements that we use
    to tell the computer what to do. The code will definitely look
    different depending on the programming language we use, but the
    algorithm will be the same.



    So let’s describe these elements:




    • Sequence– the order we want the
      computer to execute the instructions we provide as programmers. For
      example, do this first, then do this, then do that, and so forth.

    • Selection– selecting which path of an algorithm to execute depending
      on some criteria. For example, if you passed a class in school, then
      we execute the operations that clap and cheer and play a song. But if
      you didn’t pass the class, then maybe we would say, “Better luck next
      time, hang in there!”

    • Iteration– looping or repeating. Many times, we
      want to be able to repeat a set of operations a specific number of
      times or until some condition occurs.




    To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.



    So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.






    share|improve this answer





















    • 1





      I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

      – Quelklef
      Apr 18 at 17:39






    • 1





      "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

      – Tanner Swett
      Apr 18 at 18:04











    • @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

      – T.E.D.
      Apr 18 at 18:07








    • 1





      @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

      – HTNW
      Apr 19 at 0:33






    • 1





      @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

      – Mario Carneiro
      Apr 19 at 18:49



















    3














    I'm going to go out on a limb here and assume that what is wanted is not a language that has conditional branches i.e. an equivalent to



    if condition then goto someLabel


    because Turing complete computers have had that since the beginning. I'm going to assume we are talking about a block structured conditional like



    if condition
    some arbitrary sequence of statements including perhaps nested ifs
    else
    some other arbitrary sequence of statements including perhaps nested ifs


    Some early contenders for that would be:




    • Lisp (1958) which has an if and cond function. I think condpredates if. When I learned Lisp in the 1980's I'm fairly sure that if wasn't there.

    • Algol 60 (1960) which has the structured if inherited by most modern imperative languages


    Early versions of FORTRAN and COBOL did not have structured if statements as far as I know.






    share|improve this answer
























    • I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

      – R. Schmitz
      Apr 18 at 15:48











    • Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

      – Kelvin Sherlock
      Apr 18 at 22:53












    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "648"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9734%2fwhat-was-the-first-language-to-use-conditional-keywords%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    18














    The Analytical Engine designed in 1837 was capable of conditional branches



    From the wiki (emphasis mine):




    The programming language to be employed by users was akin to modern
    day assembly languages. Loops and conditional branching were possible,
    and so the language as conceived would have been Turing-complete as
    later defined by Alan Turing.




    The wiki later provides an example of the conditional being executed (with the code represented on cards):




    For example, a factorial program would be written as:



    N0 6 
    N1 1
    N2 1
    ×
    L1
    L0
    S1
    -
    L0
    L2
    S0
    L2
    L0
    CB?11


    where the CB is the conditional branch instruction or "combination card" used to make the control flow jump,
    in this case backwards by 11 cards.




    Ada Lovelace may very well be the first to have written a program for this machine.




    Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered to be the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason.







    share|improve this answer








    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
















    • 6





      It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

      – Darrel Hoffman
      Apr 18 at 17:17











    • It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

      – bitsoflogic
      Apr 19 at 13:49






    • 1





      Either way, I figured the language was the most important thing to note for this conversation.

      – bitsoflogic
      Apr 19 at 13:50











    • And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

      – leo
      Apr 19 at 18:02
















    18














    The Analytical Engine designed in 1837 was capable of conditional branches



    From the wiki (emphasis mine):




    The programming language to be employed by users was akin to modern
    day assembly languages. Loops and conditional branching were possible,
    and so the language as conceived would have been Turing-complete as
    later defined by Alan Turing.




    The wiki later provides an example of the conditional being executed (with the code represented on cards):




    For example, a factorial program would be written as:



    N0 6 
    N1 1
    N2 1
    ×
    L1
    L0
    S1
    -
    L0
    L2
    S0
    L2
    L0
    CB?11


    where the CB is the conditional branch instruction or "combination card" used to make the control flow jump,
    in this case backwards by 11 cards.




    Ada Lovelace may very well be the first to have written a program for this machine.




    Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered to be the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason.







    share|improve this answer








    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
















    • 6





      It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

      – Darrel Hoffman
      Apr 18 at 17:17











    • It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

      – bitsoflogic
      Apr 19 at 13:49






    • 1





      Either way, I figured the language was the most important thing to note for this conversation.

      – bitsoflogic
      Apr 19 at 13:50











    • And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

      – leo
      Apr 19 at 18:02














    18












    18








    18







    The Analytical Engine designed in 1837 was capable of conditional branches



    From the wiki (emphasis mine):




    The programming language to be employed by users was akin to modern
    day assembly languages. Loops and conditional branching were possible,
    and so the language as conceived would have been Turing-complete as
    later defined by Alan Turing.




    The wiki later provides an example of the conditional being executed (with the code represented on cards):




    For example, a factorial program would be written as:



    N0 6 
    N1 1
    N2 1
    ×
    L1
    L0
    S1
    -
    L0
    L2
    S0
    L2
    L0
    CB?11


    where the CB is the conditional branch instruction or "combination card" used to make the control flow jump,
    in this case backwards by 11 cards.




    Ada Lovelace may very well be the first to have written a program for this machine.




    Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered to be the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason.







    share|improve this answer








    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.










    The Analytical Engine designed in 1837 was capable of conditional branches



    From the wiki (emphasis mine):




    The programming language to be employed by users was akin to modern
    day assembly languages. Loops and conditional branching were possible,
    and so the language as conceived would have been Turing-complete as
    later defined by Alan Turing.




    The wiki later provides an example of the conditional being executed (with the code represented on cards):




    For example, a factorial program would be written as:



    N0 6 
    N1 1
    N2 1
    ×
    L1
    L0
    S1
    -
    L0
    L2
    S0
    L2
    L0
    CB?11


    where the CB is the conditional branch instruction or "combination card" used to make the control flow jump,
    in this case backwards by 11 cards.




    Ada Lovelace may very well be the first to have written a program for this machine.




    Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered to be the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason.








    share|improve this answer








    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    share|improve this answer



    share|improve this answer






    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    answered Apr 18 at 14:35









    bitsoflogicbitsoflogic

    2963




    2963




    New contributor




    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    New contributor





    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    bitsoflogic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.








    • 6





      It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

      – Darrel Hoffman
      Apr 18 at 17:17











    • It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

      – bitsoflogic
      Apr 19 at 13:49






    • 1





      Either way, I figured the language was the most important thing to note for this conversation.

      – bitsoflogic
      Apr 19 at 13:50











    • And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

      – leo
      Apr 19 at 18:02














    • 6





      It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

      – Darrel Hoffman
      Apr 18 at 17:17











    • It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

      – bitsoflogic
      Apr 19 at 13:49






    • 1





      Either way, I figured the language was the most important thing to note for this conversation.

      – bitsoflogic
      Apr 19 at 13:50











    • And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

      – leo
      Apr 19 at 18:02








    6




    6





    It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

    – Darrel Hoffman
    Apr 18 at 17:17





    It should be noted however that the Analytical Engine was never actually built, so only exists as theory.

    – Darrel Hoffman
    Apr 18 at 17:17













    It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

    – bitsoflogic
    Apr 19 at 13:49





    It was made functional in an emulator though: retrocomputing.stackexchange.com/a/6287/11796.

    – bitsoflogic
    Apr 19 at 13:49




    1




    1





    Either way, I figured the language was the most important thing to note for this conversation.

    – bitsoflogic
    Apr 19 at 13:50





    Either way, I figured the language was the most important thing to note for this conversation.

    – bitsoflogic
    Apr 19 at 13:50













    And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

    – leo
    Apr 19 at 18:02





    And just to confirm: Ada Lovelace's code (large image) does indeed contain a conditional. She also makes a comment about that in her notes, writing “if we were calculating for n = 1 instead of n = 4, Operation 6 would have completed the computation of B1 itself, in which case the engine instead of continuing its processes, would have to put B1 on V21[...]”

    – leo
    Apr 19 at 18:02











    10














    Computers since ENIAC have had conditional branch instructions (like jump if zero), which means assembly languages have had such a statement since the beginning, and there is no logical reason for higher-level languages to ever have forgone using it.



    While it's probably theoretically possible to make programs with just your indirect jump idea, you sort of have a chicken and egg problem where it's difficult to get the branch address into the register conditionally in the first place. Implementing a conditional branch using only indirect jumps would add several instructions every time you needed to make a choice, using precious time, memory, and registers,






    share|improve this answer




























      10














      Computers since ENIAC have had conditional branch instructions (like jump if zero), which means assembly languages have had such a statement since the beginning, and there is no logical reason for higher-level languages to ever have forgone using it.



      While it's probably theoretically possible to make programs with just your indirect jump idea, you sort of have a chicken and egg problem where it's difficult to get the branch address into the register conditionally in the first place. Implementing a conditional branch using only indirect jumps would add several instructions every time you needed to make a choice, using precious time, memory, and registers,






      share|improve this answer


























        10












        10








        10







        Computers since ENIAC have had conditional branch instructions (like jump if zero), which means assembly languages have had such a statement since the beginning, and there is no logical reason for higher-level languages to ever have forgone using it.



        While it's probably theoretically possible to make programs with just your indirect jump idea, you sort of have a chicken and egg problem where it's difficult to get the branch address into the register conditionally in the first place. Implementing a conditional branch using only indirect jumps would add several instructions every time you needed to make a choice, using precious time, memory, and registers,






        share|improve this answer













        Computers since ENIAC have had conditional branch instructions (like jump if zero), which means assembly languages have had such a statement since the beginning, and there is no logical reason for higher-level languages to ever have forgone using it.



        While it's probably theoretically possible to make programs with just your indirect jump idea, you sort of have a chicken and egg problem where it's difficult to get the branch address into the register conditionally in the first place. Implementing a conditional branch using only indirect jumps would add several instructions every time you needed to make a choice, using precious time, memory, and registers,







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 18 at 12:56







        Karl Bielefeldt






























            4














            The answer would, by definition, be the first programming language.



            A little bit of free CS101 here...



            All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.




            Sequence, Selection, and Iteration are the basic elements that we use
            to tell the computer what to do. The code will definitely look
            different depending on the programming language we use, but the
            algorithm will be the same.



            So let’s describe these elements:




            • Sequence– the order we want the
              computer to execute the instructions we provide as programmers. For
              example, do this first, then do this, then do that, and so forth.

            • Selection– selecting which path of an algorithm to execute depending
              on some criteria. For example, if you passed a class in school, then
              we execute the operations that clap and cheer and play a song. But if
              you didn’t pass the class, then maybe we would say, “Better luck next
              time, hang in there!”

            • Iteration– looping or repeating. Many times, we
              want to be able to repeat a set of operations a specific number of
              times or until some condition occurs.




            To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.



            So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.






            share|improve this answer





















            • 1





              I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

              – Quelklef
              Apr 18 at 17:39






            • 1





              "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

              – Tanner Swett
              Apr 18 at 18:04











            • @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

              – T.E.D.
              Apr 18 at 18:07








            • 1





              @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

              – HTNW
              Apr 19 at 0:33






            • 1





              @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

              – Mario Carneiro
              Apr 19 at 18:49
















            4














            The answer would, by definition, be the first programming language.



            A little bit of free CS101 here...



            All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.




            Sequence, Selection, and Iteration are the basic elements that we use
            to tell the computer what to do. The code will definitely look
            different depending on the programming language we use, but the
            algorithm will be the same.



            So let’s describe these elements:




            • Sequence– the order we want the
              computer to execute the instructions we provide as programmers. For
              example, do this first, then do this, then do that, and so forth.

            • Selection– selecting which path of an algorithm to execute depending
              on some criteria. For example, if you passed a class in school, then
              we execute the operations that clap and cheer and play a song. But if
              you didn’t pass the class, then maybe we would say, “Better luck next
              time, hang in there!”

            • Iteration– looping or repeating. Many times, we
              want to be able to repeat a set of operations a specific number of
              times or until some condition occurs.




            To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.



            So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.






            share|improve this answer





















            • 1





              I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

              – Quelklef
              Apr 18 at 17:39






            • 1





              "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

              – Tanner Swett
              Apr 18 at 18:04











            • @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

              – T.E.D.
              Apr 18 at 18:07








            • 1





              @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

              – HTNW
              Apr 19 at 0:33






            • 1





              @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

              – Mario Carneiro
              Apr 19 at 18:49














            4












            4








            4







            The answer would, by definition, be the first programming language.



            A little bit of free CS101 here...



            All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.




            Sequence, Selection, and Iteration are the basic elements that we use
            to tell the computer what to do. The code will definitely look
            different depending on the programming language we use, but the
            algorithm will be the same.



            So let’s describe these elements:




            • Sequence– the order we want the
              computer to execute the instructions we provide as programmers. For
              example, do this first, then do this, then do that, and so forth.

            • Selection– selecting which path of an algorithm to execute depending
              on some criteria. For example, if you passed a class in school, then
              we execute the operations that clap and cheer and play a song. But if
              you didn’t pass the class, then maybe we would say, “Better luck next
              time, hang in there!”

            • Iteration– looping or repeating. Many times, we
              want to be able to repeat a set of operations a specific number of
              times or until some condition occurs.




            To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.



            So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.






            share|improve this answer















            The answer would, by definition, be the first programming language.



            A little bit of free CS101 here...



            All algorithms can be expressed using 3 elements: sequence, selection, and iteration. Those are the basic building-blocks of a computer program. In order to express an algorithm with a programming language, it has to support those 3 elements in some form. An "if" check is of course a kind of selection.




            Sequence, Selection, and Iteration are the basic elements that we use
            to tell the computer what to do. The code will definitely look
            different depending on the programming language we use, but the
            algorithm will be the same.



            So let’s describe these elements:




            • Sequence– the order we want the
              computer to execute the instructions we provide as programmers. For
              example, do this first, then do this, then do that, and so forth.

            • Selection– selecting which path of an algorithm to execute depending
              on some criteria. For example, if you passed a class in school, then
              we execute the operations that clap and cheer and play a song. But if
              you didn’t pass the class, then maybe we would say, “Better luck next
              time, hang in there!”

            • Iteration– looping or repeating. Many times, we
              want to be able to repeat a set of operations a specific number of
              times or until some condition occurs.




            To get down deeper into computability theory, we call the ability of a model to express any algorithm Turing completeness, and selection is required for this. Most CS types will tell you than anything that isn't Turing complete isn't really a programming language.



            So by definition every programming language has some means of selection, and always has. Without that, you don't really have a programming language.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 18 at 15:29

























            answered Apr 18 at 15:19









            T.E.D.T.E.D.

            61125




            61125








            • 1





              I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

              – Quelklef
              Apr 18 at 17:39






            • 1





              "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

              – Tanner Swett
              Apr 18 at 18:04











            • @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

              – T.E.D.
              Apr 18 at 18:07








            • 1





              @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

              – HTNW
              Apr 19 at 0:33






            • 1





              @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

              – Mario Carneiro
              Apr 19 at 18:49














            • 1





              I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

              – Quelklef
              Apr 18 at 17:39






            • 1





              "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

              – Tanner Swett
              Apr 18 at 18:04











            • @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

              – T.E.D.
              Apr 18 at 18:07








            • 1





              @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

              – HTNW
              Apr 19 at 0:33






            • 1





              @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

              – Mario Carneiro
              Apr 19 at 18:49








            1




            1





            I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

            – Quelklef
            Apr 18 at 17:39





            I agree with your main these, but have a program with the 'sequence, selection, and iteration' point: declarative languages don't have sequence and yet are certainly programming language.

            – Quelklef
            Apr 18 at 17:39




            1




            1





            "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

            – Tanner Swett
            Apr 18 at 18:04





            "by definition every programming language has some means of selection" - but the question explicitly isn't asking for the first programming language with some means of selection; it's asking for the first language with "a dedicated keyword for conditional execution". So for example, the untyped lambda calculus is certainly a programming language, but it certainly does not have a dedicated keyword for conditional execution.

            – Tanner Swett
            Apr 18 at 18:04













            @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

            – T.E.D.
            Apr 18 at 18:07







            @Quelklef - That's a bit of a gray area. "Pure" declarative languages are typically not Turing complete, and the ones that are Turing complete I believe all allow some sense of sequence. (Arguably, the sequencing and iteration are still there, but buried in their interpreter). Does that mean pure declarative languages aren't proper "programming languages"? They are languages (often called DSLs), but "programming languages"?

            – T.E.D.
            Apr 18 at 18:07






            1




            1





            @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

            – HTNW
            Apr 19 at 0:33





            @T.E.D. sequence is just a metaphor. All of the "sequencing" that arises from monads is a metaphor; it's not central to the language. The monadic sequence metaphor is, however, usually built on the real notion of sequence. The real source of sequencing is that, if you want to evaluate case scrut of { D _vars -> _arm; _ -> _etc } (with data-con D), you must first evaluate scrut, match against D _vars, then evaluate _arm. The root of the sequence/evaluation/"strictness" is the runtime system, an entity "external" to Haskell that methodically tears down the data structure main.

            – HTNW
            Apr 19 at 0:33




            1




            1





            @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

            – Mario Carneiro
            Apr 19 at 18:49





            @Quelklef Actually, when Haskell evaluates f (g x) it will almost always evaluate f first, not g. This is the essence of call by need evaluation order, aka "laziness". (There are probably some strictness annotations you can put on f to make it evaluate g first, but it's not the default.) As HTNW says, the real sequencing operation in a lazy language is case (specifically, scrut must be evaluated to weak head normal form before _arm can begin evaluation).

            – Mario Carneiro
            Apr 19 at 18:49











            3














            I'm going to go out on a limb here and assume that what is wanted is not a language that has conditional branches i.e. an equivalent to



            if condition then goto someLabel


            because Turing complete computers have had that since the beginning. I'm going to assume we are talking about a block structured conditional like



            if condition
            some arbitrary sequence of statements including perhaps nested ifs
            else
            some other arbitrary sequence of statements including perhaps nested ifs


            Some early contenders for that would be:




            • Lisp (1958) which has an if and cond function. I think condpredates if. When I learned Lisp in the 1980's I'm fairly sure that if wasn't there.

            • Algol 60 (1960) which has the structured if inherited by most modern imperative languages


            Early versions of FORTRAN and COBOL did not have structured if statements as far as I know.






            share|improve this answer
























            • I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

              – R. Schmitz
              Apr 18 at 15:48











            • Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

              – Kelvin Sherlock
              Apr 18 at 22:53
















            3














            I'm going to go out on a limb here and assume that what is wanted is not a language that has conditional branches i.e. an equivalent to



            if condition then goto someLabel


            because Turing complete computers have had that since the beginning. I'm going to assume we are talking about a block structured conditional like



            if condition
            some arbitrary sequence of statements including perhaps nested ifs
            else
            some other arbitrary sequence of statements including perhaps nested ifs


            Some early contenders for that would be:




            • Lisp (1958) which has an if and cond function. I think condpredates if. When I learned Lisp in the 1980's I'm fairly sure that if wasn't there.

            • Algol 60 (1960) which has the structured if inherited by most modern imperative languages


            Early versions of FORTRAN and COBOL did not have structured if statements as far as I know.






            share|improve this answer
























            • I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

              – R. Schmitz
              Apr 18 at 15:48











            • Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

              – Kelvin Sherlock
              Apr 18 at 22:53














            3












            3








            3







            I'm going to go out on a limb here and assume that what is wanted is not a language that has conditional branches i.e. an equivalent to



            if condition then goto someLabel


            because Turing complete computers have had that since the beginning. I'm going to assume we are talking about a block structured conditional like



            if condition
            some arbitrary sequence of statements including perhaps nested ifs
            else
            some other arbitrary sequence of statements including perhaps nested ifs


            Some early contenders for that would be:




            • Lisp (1958) which has an if and cond function. I think condpredates if. When I learned Lisp in the 1980's I'm fairly sure that if wasn't there.

            • Algol 60 (1960) which has the structured if inherited by most modern imperative languages


            Early versions of FORTRAN and COBOL did not have structured if statements as far as I know.






            share|improve this answer













            I'm going to go out on a limb here and assume that what is wanted is not a language that has conditional branches i.e. an equivalent to



            if condition then goto someLabel


            because Turing complete computers have had that since the beginning. I'm going to assume we are talking about a block structured conditional like



            if condition
            some arbitrary sequence of statements including perhaps nested ifs
            else
            some other arbitrary sequence of statements including perhaps nested ifs


            Some early contenders for that would be:




            • Lisp (1958) which has an if and cond function. I think condpredates if. When I learned Lisp in the 1980's I'm fairly sure that if wasn't there.

            • Algol 60 (1960) which has the structured if inherited by most modern imperative languages


            Early versions of FORTRAN and COBOL did not have structured if statements as far as I know.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 18 at 15:30









            JeremyPJeremyP

            5,30012030




            5,30012030













            • I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

              – R. Schmitz
              Apr 18 at 15:48











            • Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

              – Kelvin Sherlock
              Apr 18 at 22:53



















            • I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

              – R. Schmitz
              Apr 18 at 15:48











            • Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

              – Kelvin Sherlock
              Apr 18 at 22:53

















            I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

            – R. Schmitz
            Apr 18 at 15:48





            I want to say yes to your going-out-on-a-limb, but that changes the question and kinda invalidates the other answers. I don't want to do that to the others, even though what you wrote is what I really wanted to know. So I asked a new question and would be happy if you just copy-pasted your answer there.

            – R. Schmitz
            Apr 18 at 15:48













            Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

            – Kelvin Sherlock
            Apr 18 at 22:53





            Early LISP had conditional support but not IF. Conditionals in M-expressions were handled via syntax. Conditionals in S-expressions were handled via the COND symbol/keyword.

            – Kelvin Sherlock
            Apr 18 at 22:53


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Retrocomputing Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9734%2fwhat-was-the-first-language-to-use-conditional-keywords%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

            How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

            Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...