Where HTML beats C? - Computerphile

Поділитися
Вставка
  • Опубліковано 26 тра 2016
  • The ultimate example of trouble from digital promiscuity. HTML is more tolerant than C because it has to be. Professor Brailsford explains.
    Deep Learning: • Deep Learning - Comput...
    Secure Web Browsing: • Secure Web Browsing - ...
    AI Game Playing Challenge: • AI's Game Playing Chal...
    Convolutional Neural Networks: • CNN: Convolutional Neu...
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

КОМЕНТАРІ • 1,1 тис.

  • @WolfireGaming
    @WolfireGaming 7 років тому +2882

    HTML: Works even if you don't follow the rules.
    CSS: Doesn't work, even if you follow the rules.
    JavaScript: Doesn't tell you the rules to begin with.

    • @JakeKlineMusic
      @JakeKlineMusic 5 років тому +47

      Hah, CSS yes. Javascript is apparently very multi-paradigmatic these days; is this perhaps what you allude to? ELSE explain? :D

    • @ngergo6
      @ngergo6 5 років тому +80

      @@JakeKlineMusic I think Javascript's biggest problem is that it uses keywords that mean similar but different things in other languages. Probably the best example is the 'this' keyword, which has the most people confused. If it was called 'context' it would be obvious to people that it's somehow different to the OOP 'this'. Of course there are other quirks too, but if you do things right you almost never encounter them.

    • @feschber
      @feschber 5 років тому +18

      Javascript is driving me insane (I don’t have a lot of experience yet)

    • @okie9025
      @okie9025 5 років тому +16

      @@ngergo6 it's honestly not that hard to understand

    • @ngergo6
      @ngergo6 5 років тому +33

      @@okie9025 of course it's not, it's just misleading. It's easy to assume that the same keywords do the same thing as in other languages and wonder why they work differently.

  • @lionbryce10101
    @lionbryce10101 3 роки тому +699

    C tolerates my mistakes.
    Me: go get the 11th element of that array which is of length 2
    Python: no
    C: cowabunga it is

    • @sentfromheaven00
      @sentfromheaven00 3 роки тому +86

      thats why i love C/C++, you can access things you’re not rly supposed to and its so fun to learn how it works

    • @borisjo13
      @borisjo13 3 роки тому +34

      @@sentfromheaven00 Yeah but it shouldn't be fun, because it can be dangerous.

    • @themanofiron785
      @themanofiron785 3 роки тому +79

      @@borisjo13 Playing with stuff like this isn't dangerous. It's dangerous if you mess it up in real code, most of the time because you haven't played with said stuff before.

    • @borisjo13
      @borisjo13 3 роки тому +11

      @@themanofiron785 it's dangerous because it's error prone. You sound like someone who also does not test their own code.
      I don't think there are many companies left that develop their new software in C anymore.

    • @themanofiron785
      @themanofiron785 3 роки тому +40

      @@borisjo13 "You sound like someone who also does not test their own code". As I said, it's dangerous if you mess it up in real code. Why would you assume I don't test my code?
      "I don't think there are many companies left that develop their new software in C anymore". Wdym? C is the most used language in the world in 2021. Google it.

  • @JinC24
    @JinC24 4 роки тому +567

    I want him to explain everything in life to me. I think then it will all make sense

    • @alabidavid4674
      @alabidavid4674 3 роки тому +7

      Underrated comment ever.

    • @dokorbokor7409
      @dokorbokor7409 3 роки тому +3

      just try to do what he is saying in your firefox browser

    • @brxne
      @brxne 3 роки тому

      Same :)

    • @francoislecanadien1710
      @francoislecanadien1710 3 роки тому +5

      His vision is so clear because he's seen it all happen.

    • @dadecountyboos
      @dadecountyboos 2 роки тому

      he has a render on how to render 42 in print

  • @ethank5681
    @ethank5681 4 роки тому +95

    This man the kind of professor at uni that you’d actually look forward to seeing

    • @gogokowai
      @gogokowai 2 роки тому +1

      The only reason I wouldn't want him as my professor is his soothing voice would lull me to sleep

  • @cheesescrust5399
    @cheesescrust5399 4 роки тому +134

    My takeaway from this video as far as languages goes:
    a proper British accent can make any topic easier to listen too 😂

    • @anonymouse9105
      @anonymouse9105 3 роки тому +8

      A proper British accent can also sell any product on an infomercial at 4 in the morning.

  • @Slithy
    @Slithy 8 років тому +869

    Next video:
    Professor David F. Brailsford vs the world: Why i called HTML a programming language.

    • @poke256
      @poke256 8 років тому +54

      I'd love a video that goes into some depth on the definition of a programming language, as well as various other categories.

    • @cgme7076
      @cgme7076 8 років тому +4

      Hahahahaha!

    • @ElGrecoOB
      @ElGrecoOB 8 років тому +14

      Well you should take a look at the latest computerphile video then ;)

    • @Slithy
      @Slithy 8 років тому

      ElGrecoOB
      Already watched it, mate :)

    • @MrGoatflakes
      @MrGoatflakes 6 років тому +31

      From a computer science perspective it _is_ a computer programming language, it just doesn't allow you to do half of the things other programming languages do.

  • @bluesquare23
    @bluesquare23 5 років тому +87

    At the beginning of the book The C Programing Language it says, “C assumes the programmer knows best.” Which is exactly the case here.

    • @dromedda6810
      @dromedda6810 2 роки тому +5

      and here i am trying to access index[-1]

    • @scott7410
      @scott7410 2 роки тому

      Have to know what the language is expecting to do based on your input

    • @donkeyy8331
      @donkeyy8331 Рік тому

      @@dromedda6810 and it will try to get something, just don't know what it is.

  • @CowboyFrankHarrell
    @CowboyFrankHarrell 8 років тому +42

    Quite a few years ago, (late 90's) while looking for something else, I came across a very long document by the W3 group which explained, in fairly simple terms, how a web browser should interpret and render html code. It also contained sections defining how to behave when the browser encountered mistakes in html code. The document was aimed at web browser developers. I only scanned the first few pages because it wasn't what i needed at the time but I wish I had kept it because it was so well written even non-programmers could understand it. I have not come across it, or any later version, since then.

  • @3dmoddeler
    @3dmoddeler 8 років тому +1249

    Why do Java programmers wear glasses ? They can't C#

  • @luffyorama
    @luffyorama 8 років тому +88

    What did I understand is that he tried to compare not between HTML and C as markup language as programming language vs programming language but talked about why HTML can be so forgiving, syntax wise and tolerant compared to say, C language.

    • @schreiermichael98
      @schreiermichael98 8 років тому +20

      Exactly. People here are complaining about little details, which are not even tropic of this video.

    • @exapsy
      @exapsy 8 років тому +4

      He clearly says in the end "It is a programming language, it is an executable language" never heard two statements together in Computerphile being so wrong.

    • @daggawagga
      @daggawagga 8 років тому +10

      +apostolis anastasiou
      The quote is "It is a programming language, it is an _execution environment_", just being nitpicky.

    • @exapsy
      @exapsy 8 років тому

      ***** He clearly said "HTML is a programming language" ... so I suppose that no ... he wasn't comparing Markup Lang with a Prog Lang

    • @TremereTT
      @TremereTT 2 роки тому +1

      He looked at both of them as a formal grammar or contextfree grammar, If you have studied informatics you might remember: Production rules, the symbols devided into startsymbol, alphabet and terminalsymbols and nonterminalsymbols...
      You learn this before you learn to build a parser and a compiler.

  • @bcbock
    @bcbock 4 роки тому +17

    The tag isn’t picky and doesn’t nest. But is and does. And they are important when you get to JavaScript and CSS and you want to operate on parents and children. You need a hierarchy for that.

  • @DampeS8N
    @DampeS8N 8 років тому +673

    While I get what you guys are trying to accomplish here, telling new programmers that HTML is a programming language hurts more than it helps. We draw a distinction between a markup language and a programming language for a reason. HTML doesn't result in a program, a program uses it to generate a view of data. It is input, not code.

    • @javiergelatti
      @javiergelatti 8 років тому +14

      Totally agree

    • @AndrewMeyer
      @AndrewMeyer 8 років тому +21

      They should have just used JavaScript as the example instead.

    • @dbporter
      @dbporter 8 років тому +29

      I don't think this is directed at new programmers? I have been a web developer for a decade+ and found this enlightening.

    • @sarowie
      @sarowie 8 років тому +6

      That would not have worked. I mean: Javascript is more relaxed then C, but this is the bases on why it is a mess to code Javascript. First you write it for "any browser" and then you have to debug it for internet explorer and arcane "makes life easier" non sense in there.

    • @TaxTaxes
      @TaxTaxes 8 років тому +8

      who said this was targeted to new programmers?

  • @MarneusAndMilkyBlood
    @MarneusAndMilkyBlood 8 років тому +304

    >comparing a markup language to a programming language
    What is happening, is this really Computerphile?

    • @ar_xiv
      @ar_xiv 8 років тому +5

      did you watch it?

    • @MarneusAndMilkyBlood
      @MarneusAndMilkyBlood 8 років тому +28

      Yes. And it does exactly compare a simple markup language to a Turing complete programming language. Apple to oranges.

    • @ar_xiv
      @ar_xiv 8 років тому

      I know what you're saying but I still found the vid informative

    • @ar_xiv
      @ar_xiv 8 років тому +6

      Sometimes it's revealing to compare apples to oranges

    • @TuvAlpha
      @TuvAlpha 8 років тому +11

      Writing HTML is indeed not coding, but the fundamental way that HTML works, the backend if you will, still has to interact with your computer like a normal program does (utilizing networking, showing graphics, browser differences etc.) This is a comparison between how HTML and C choose to deal with ambiguity in regards to your computer.
      There's no need to be a baby about code vs. markup languages, especially when you are using it to deliberately overlook something valid.

  • @TazG2000
    @TazG2000 5 років тому +30

    "those of you who have written a program know that if you interpret it it's not going to try and mend your bad program for you"
    This man obviously isn't aware of the horrors of php. Hopefully he remains as lucky for the rest of his life.

    • @cubeson4168
      @cubeson4168 2 роки тому +3

      I hate it when my html becomes blank because I forgot a $ symbol somewhere in my php

  • @konventikel
    @konventikel 8 років тому +212

    Feel like everyone is missing the point of the video.
    I thought it was interesting.

    • @bcbock
      @bcbock 4 роки тому +6

      Right, although he limited himself the HTML’s tag. Not all HTML tags are like that. You have to designate closing tags for most other HTML tags or like in programming languages, you’ll get undesired results. While you CAN omit the tag, it won’t pass validators for HTML5.

    • @ankitaaarya
      @ankitaaarya 4 роки тому +10

      @@bcbock validators doesnt execute, saying validators wont pass is same as, html source is not written as per standards. But thats not the point of the video.

  • @JLDoctorWho
    @JLDoctorWho 8 років тому +25

    That should have read "I'm sorry Dave. I'm afraid I can't do that."

  • @michaelparks3106
    @michaelparks3106 2 роки тому +3

    Another quirk of HTML is that it is interpreted by the browser, and not all browsers interpret exactly the same. This can cause huge headaches when trying to make a piece of HTML code work on all browsers. It might even be different from one version of the same browser to the next.

  • @Yupppi
    @Yupppi 3 роки тому +23

    I love languages like C++ where everything makes sense, even if it's difficult or you don't know how it works. It all makes sense when you read it. And if you think about what you're doing, it's so clear to write.

  • @DesolateFields
    @DesolateFields 8 років тому +537

    HTML is tolerant because it is a markup language and contains no logic and can't evaluate expressions. Therefore it will contain MUCH less possible errors and all of these common errors can be accounted for and pre-fixed on the browser level.

    • @DarkAncientZ
      @DarkAncientZ 8 років тому +6

      XML with DTDs is very strict.

    • @Vulume
      @Vulume 8 років тому +2

      The important part isn't that HTML can do this, but that it also effectively does this. There are logic-free GUI libraries for C and such, but none that I know of are as robust as HTML engines. The best systems for this of course hang somewhere in between. There are interface builders like for Qt that generate low level code.

    • @Benimation
      @Benimation 8 років тому +4

      HTML isn't entirely logic free. There are ways to determine what browser you're using (mostly used for IE, of course) and whether javascript is enabled. The browser can show different elements based upon this.

    • @Benimation
      @Benimation 8 років тому

      Growl wn, it is logic, but it's limited to do exactly that.

    • @fschuetz04
      @fschuetz04 8 років тому +1

      Python code is no code as well, I'd say. It's input for the Python interpreter for sure

  • @Huntracony
    @Huntracony 8 років тому +82

    It's not wonderfull, because when I make a mistake in HTML, I have no way of knowing where it is. So I need to check whether I haven't broken something about every other minute.

    • @sarowie
      @sarowie 8 років тому +13

      you can use XHTML and an XTHML validator. That's like actually reading all the complier warning that a C compiler spits out.
      (You would wonder how many programmers ignore C compiler warnings)

    • @OFfic3R1K
      @OFfic3R1K 8 років тому +4

      sarowie I mean _serious HTML debugging_, come on. There is only one platform that can do that. It's obviously IE.

    • @majorgnu
      @majorgnu 8 років тому +4

      +OFfic3R1K Ah, the HTML validation methodology of the late nineties and naughties.

    • @Theraot
      @Theraot 8 років тому +2

      There are HTML5 validators, and why are you using something else?

    • @TaiFerret
      @TaiFerret 8 років тому +1

      In Firefox you can view the source and mistakes will be shown in bold red.

  • @unvergebeneid
    @unvergebeneid 8 років тому +598

    Two minutes into the video and I'm getting worried ... he'll explain the difference between a programming language and a markup language at some point, won't he?

    • @zerg6205
      @zerg6205 8 років тому +28

      *looks up what a markup language is*

    • @Qman621
      @Qman621 8 років тому +62

      a markup language IS a programming language

    • @ozdergekko
      @ozdergekko 8 років тому

      thanks for writing my comment ;-)

    • @evenstevens280
      @evenstevens280 8 років тому +150

      It's not. Markup is for defining information. Programming is for defining instructions.
      It's the difference between the phrases "A guitar has 6 strings" and "Pluck the B string".

    • @Qman621
      @Qman621 8 років тому +34

      Are instructions not a type of information? This "information" is really just a list of instructions for where and how to display different types of information. Its like the difference between a machine that builds a guitar using a list of instructions and a machine that plays said guitar. I think that is a much more apt metaphor.

  • @slugfiller
    @slugfiller 6 років тому +6

    Close tag tolerance for things like a paragraph tag is the most minor of HTML's parsing tolerance. Heck, it wouldn't even work for divs. A more interesting thing is how it deals with broken tags, or angle brackets in attribute values. It has a whole bunch of rules, and, naturally, they used to be different between IE and everyone else.

  • @JosephOster
    @JosephOster 5 років тому +4

    tags can be nested, tags will be sequential within each and tags will be terminated by tags.

  • @123tobiiboii123
    @123tobiiboii123 8 років тому +101

    I don't know why people are complaining that HTML isn't a programming language. You completely missed the point of the video if that's your take away

    • @unvergebeneid
      @unvergebeneid 8 років тому +26

      I think this video makes it very easy to miss its point. Which is a big problem with a video, especially on an educational channel.

    • @rustygear447
      @rustygear447 8 років тому +11

      +Tera
      I don't think it's missing the point. I think they are trying to fix a big mistake. HTML and C are not in the same ball field. it's like comparing apple and orange.

    • @dealloc
      @dealloc 8 років тому +2

      Rather, it's like comparing an apple to a car.

    • @SalahEddineH
      @SalahEddineH 8 років тому +2

      ui_wizard ***** Seyha Leonhartz
      They're not trying to fix a big mistake, they're focusing on the fact that the speaker said "HTML is a programming language". By the common definition of Programming Language, it's not.
      The video isn't about that at all! It's comparing HTML to C, which are both LANGUAGES! They are in the same ball field, because they both go through parsers! That's the only common ground that they're being compared on. Yes they're not both Programming Languages, but both have to be parsed. One of them (html) parses unclosed blocks by closing them right before the next block tag (i.e. supposing you meant to sequence the blocks, instead of nesting them), while the other (C) refuses to compile the code if you have unclosed blocks, because it doesn't want to guess, it needs to know exactly where you meant to put the }, as moving it changes the behavior of the code drastically.
      (Moving a in html can also alter the rendering of the page a lot, especially is the CSS is quite involved)
      I hope that clears it a little! Cheers!
      (Moving a in html can also alter the rendering of the page a lot, especially is the CSS is quite involved)
      I hope that clears it a little! Cheers!

    • @dealloc
      @dealloc 8 років тому +3

      Salah Eddine H While I agree that this video was mainly based on language parsing, both the title as well as content suggested a comparison between the two, even though it was not the main part of the video.

  • @pseudonomous
    @pseudonomous 3 роки тому +4

    While some HTML tags like cannot be nested, other tags like can be arbitrarily nested. At that point you can't unambiguously interpret malformed HTML anymore. But the browser will definitely still render something. Since HTML is a markup language, I think the browser figures bad input is "harmless", the worst case scenario is that a page is unreadable.
    A programming language which is designed to execute arbitrary expressions can do a lot more damage than an improperly formatted document. Arguably, this is the real reason why 'proper' programming languages will not (generally) attempt to execute or compile invalid syntax while web browsers will happily chug along and render something.

  • @olivier2553
    @olivier2553 8 років тому +394

    Simple answer: html is not a programmming language

    • @LaatiMafia
      @LaatiMafia 8 років тому +5

      @9:00
      HTML is a programming language.

    • @Gr33nMamba
      @Gr33nMamba 8 років тому +24

      If you're going to say that HTML is a programming language, then you might as well include things such as word documents, as they too are based on ML, or 'Markup Language'. So, no, HTML is a not a programming language. It is called "markup" for that reason.

    • @JamesBedford
      @JamesBedford 8 років тому +11

      To say that "HTML is a programming language" is incorrect. First line of the wipedia article...
      en.wikipedia.org/wiki/HTML
      Expected better from Computerphile.

    • @LaatiMafia
      @LaatiMafia 8 років тому +5

      Expected a better source than Wikipedia -.-

    • @JamesBedford
      @JamesBedford 8 років тому +4

      I'm the better source ;p

  • @intimacywithmedium
    @intimacywithmedium 6 років тому +2

    No mention of how tags are by default block layout elements (according to CSS). That's why they will appear to be in sequence when they are nested.

    • @igorswies5913
      @igorswies5913 3 роки тому

      actually according to the spec a p element is not allowed to have a p element as a child

  • @Springwight
    @Springwight 7 років тому +6

    In the days of XHTML 1.1 (around ten years ago), web standards were actually going in a less permissive direction. The idea was to force HTML pages to be valid XML documents. This also came with built-in strictness. If you made a mistake in your XHTML, the user would see an error message, not a fixed-up document.
    However, this behavior would only be enabled if your XHTML was served the the application/xml+xhtml content type, which is very rarely was. In the end, the attempt to XML-ize the web failed and other forces in the industry came up with HTML5, that quickly became the internet standard.

    • @yash1152
      @yash1152 2 роки тому

      ahw yeah, i remember seeing error codes in xml documents

    • @yash1152
      @yash1152 2 роки тому

      thanks for sharing this, 'cz i was thinking how could html even show errors, but your mention of xml made me recall that

  • @GroovingPict
    @GroovingPict 7 років тому +7

    It is the browser interpreting the html that is tolerant, it isnt html itself... the browser can be programmed to treat nested paragraphs the same as sequential paragraphs or it can be programmed not to or it can even be programmed very strict and just display an error if it isnt strictle adhering to convention. The tolerance is not at all an inherent property of html itself, but a product of the makers of browsers wanting people to install their product, so they want to be as useful as possible with as few errors as possible, which includes error anticipation and handling: browsers didnt use to be this tolerant of errors in the past, which is a clear indication it has nothing to do with html itself. This is all that is: error handling, it isnt "tolerance" by the language itself. Also it isnt a programming language, so why the comparison with C? A programming language has to be rigurous in order to be consistent. The interpreter of a markup language (such as a web browser) can afford to have a lot of ways to treat and "ignore" errors (they dont ignore the errors, they just have a programmed behaviour for what to do when they encounter them).

  • @zerg6205
    @zerg6205 8 років тому +17

    Hmm, where HTML beats C is that it has a system of rules to try to autocomplete your code for you when you finish it with errors? Sounds like autoAim in video games: Useful until you need to aim at something that's close to a few other things... that it keeps locking onto instead of the thing that you want to aim at.

    • @gralha_
      @gralha_ 8 років тому +2

      It ends up not making much of a difference. If mess up and html forgives you, there are great chances that it may interpret it not in the same way you did, leading to the pain of proof reading a lot

    • @Ownage4lif31
      @Ownage4lif31 8 років тому +1

      Also, no compiling errors. It will execute everything and if it doesn't work, it doesn't work. Unlike many other languages which force you to fix the error before executing

    • @zerg6205
      @zerg6205 8 років тому

      BlackenGames That's kinda neat. I've been doing some things in Java and if something can go wrong, you have to tell it or else it'll crash. It's kinda confusing for a beginner, but I think I'd prefer it crashing than not doing what I thought I told it to and being even more confused.

    • @zerg6205
      @zerg6205 8 років тому

      Now that I've had some experience with Html, I should watch this again!

    • @caughtexception611
      @caughtexception611 8 років тому +1

      +greenmumm Agreed, but HTML remains a useful language nonetheless. You can't feasibly make a website without using a markup language, and you can't feasibly make the web browser without the programming language. The two work together, and neither is better than the other.

  • @Kitsudote
    @Kitsudote 6 років тому

    As all the other people said: HTML is not in the slightest a programming language. But even more important: HTML tags have basically *absolutely* no meaning when you remove the CSS. If sequences or nestet s make a difference depends solely on the CSS.

  • @giancarloandrebravoabanto7091
    @giancarloandrebravoabanto7091 4 роки тому +2

    7:04 damn i love those animations and that professor too

  • @KennethKolano
    @KennethKolano 8 років тому +8

    This compares apples an oranges.
    tags have specific rules that say they can't be nested, none of the other things compared with do, so the comparison is invalid. Comparing with a tag that could either be nested or not, such as would show similar problems as faced by the C compiler, where the browser is unable to guess at the appropriate output. They will guess, but there is no way to know that the guesses made are valid.

    • @peppigue
      @peppigue 3 роки тому +2

      Also, is a much more descriptive tag than a curly brace, which is more general purpose. C could hypothetically be edited to use html-like tag pairs like {func} with {/func}, which would allow compilers to make educated guesses similar to how html interpreters do.

  • @feldinho
    @feldinho 8 років тому +23

    Here is a code block in C without brackets:
    if (x) printf("x is true");
    The way is handled by the engine is a documented exception and has predictable behavior, just like that C line above.
    I get the point of the video but that example was really weak!

    • @Sandromatic
      @Sandromatic 8 років тому +3

      ah, but without brackets you can only have 1 statement. so it's still unambiguous, as if you then say print "blah" it will always print blah regardless of whether x is true or not. (also that "print" is invalid syntax in c.)

    • @feldinho
      @feldinho 8 років тому +7

      Sandra Nicole And that's my point! The behavior of oddly nested tags are also unambiguous! It's explicit and well documented.
      (and thanks for point out the faulty syntax. I don't touch a C program in a while :x)

    • @Sandromatic
      @Sandromatic 8 років тому

      In XHTML, the tag is a paragraph separator. In c, the if statement always takes a single statement. A block in c is a collection of statements that can be used where a statement is placed.
      In XML you can have tags that don't end, you just have to have them like "" with the slash after the name instead of before it.

    • @feldinho
      @feldinho 8 років тому

      ***** I meant exception as in “exception to the rule”, not as in “throw exception”. But yeah, you're right! s auto-close when followed by another block tag, and the second is another block tag! that's actually easier then what's said in the video!

    • @AndyVanee
      @AndyVanee 8 років тому +2

      My thoughts exactly. The example he gave had no ambiguity at all according to the HTML spec. tags are always closed when followed by another and unmatched closing tags are always silently discarded.

  • @fitzi
    @fitzi 8 років тому +2

    The reason why HTML "knows" (it's really the browser that's correcting your mistakes) that there should be a closing before the new starting tag is because paragraphs are NOT allowed to hold other paragraphs (or block elements in general) by specification. Therefore the browser knows that it must be closed.
    And calling HTML a programming language is just wrong.
    I get the point you wanted to get across, but I really need to say that this was a pretty bad example.

  • @tanotoscano7579
    @tanotoscano7579 8 років тому

    love this HTML series of videos... can't wait to see one about JavaScript and css

  • @anarkafkas2588
    @anarkafkas2588 4 роки тому +8

    If HTML was a programming language, we wouldn't need JavaScript with it.

    • @xAlien95
      @xAlien95 3 роки тому +2

      If HTML was a programming language (in the common sense), then XML should've been too. If XML was a programming language, then JSON should've been too. HTML is a descriptive markup language.
      I'm afraid the Professor is a little bit off this time, since even in the first few minutes he got something completely wrong: "TextText" is different from "TextText". Although they look the same with the Firefox default css applied rules, it doesn't mean they are the same. If the default css applied rules had a "p { padding-left: 10pt }", then the corresponding outputs would look different.

    • @109Rage
      @109Rage 3 роки тому

      He already made a video explaining what makes HTML a "programming language". In simple terms, HTML is a declarative programming language which defines a document. PostScript is a similar example, only PS is actually Turing complete, unlike HTML.
      Stuff like Javascript was added in to make those documents more interactive, but there's no reason raw HTML couldn't have been designed to be turing complete by just adding some if/for tags or something.

    • @109Rage
      @109Rage 3 роки тому

      ​@@xAlien95 In HTML the two outputs are the same, with the minor exception that the nested version creates an extra (empty) paragraph due to the last being treated as extra, because the two other are already closed due to HTML's implicit rules… But that's in HTML.
      YOU seem to be talking about XHTML, which is different, and more "strict" about end-closing tags. In XHTML's case, yes, the two examples would come out extremely different, because unlike HTML, XHTML doesn't try to "guess" what mistakes you made and will even throw out what amounts to compile errors.

  • @SouravTechLabs
    @SouravTechLabs 4 роки тому +13

    "It (HTML) is a programming language" - Professor Brailsford
    😆😆😆😆😆😆😆😆😆

    • @gmp3940
      @gmp3940 4 роки тому +1

      Finlay Mitchell
      He said it at 8:59
      Whoever this man is, he should definitely not talk about programming languages.

    • @gmp3940
      @gmp3940 4 роки тому +1

      Finlay Mitchell
      Maybe he is, but html is definitely not a “programming“ language. It is for sure not turing complete.

  • @AlexSchmid-TheAceofSpades
    @AlexSchmid-TheAceofSpades 3 роки тому +1

    This guy is basically coding-gandalf.
    As a computer science guy myself, I love it.

  • @firezdog
    @firezdog 5 років тому

    I don’t know if I’d agree that this happens because html is not built for nesting and complexity - the entire document structure is rendered as one big n-ary tree. Rather I think the reason why HTML can be so tolerant, at least in the example given, is because of the semantic ideas that are part of the tag. Simple by using the tag, you’ve already given the interpreter a lot of information about what you’re trying to do, in a way that you haven’t if you put one for loop after another without specifying the relationship between them.

  • @Clairvoire
    @Clairvoire 8 років тому +6

    I compiled a list of use cases where HTML beats C:

    • @Benimation
      @Benimation 8 років тому +13

      You could've at least ordered your list

  • @tomgates316
    @tomgates316 6 років тому +5

    What’s missing here is the origin of HTML. It is IBM’s mainframe word processing language. In recent years things have been added to it for video screens like the color codes.
    I began using HTML (Hyper Text Markup Language) in the mid 70’s to write documentation manuals on our IBM 360 & 370 mainframes. You’d type the document into a text file and add the various formatting control codes. Paragraphs, line items, ordered (numbered) line items, footnote references, index entry tags, bold type, underline, etc.
    If I dig deep enough in the basement I should be able to dig up my copy of the IBM HTML reference manual. Mine had a 1972 copyright date. Probably a 3rd or 4th version.
    Remember early personal computer word processors in early 80’s? Word Perfect, AppleWriter, etc? Text files with formatting commands embedded in the text. Welcome to the origins of IBM HTML.

    • @christianhujer346
      @christianhujer346 Рік тому +1

      You are confusing HTML and GML/SGML, I'm afraid. While HTML was originally (until HTML 4.01) based on SGML, they're not the same thing. HTML was created ~1991.

  • @elmersbalm5219
    @elmersbalm5219 5 років тому

    The example would work better with . The HTML specification is clear about tags: you cannot nest them. There is a clear reason for the browser making a silent assumption. Edge cases were interpreted differently in different browsers thus causing mayhem when the the html was rendered on screen. In short HTML has the same problems as other markup and programming langauges.

  • @FEETOFKEELEY
    @FEETOFKEELEY 2 роки тому

    Most intensely addictive channel in UA-cam other than Ben Eater's. I spent hours in UA-cam after finding this channel.

  • @Qbe_Root
    @Qbe_Root 8 років тому +42

    Next video: *Where Sony Vegas beats make*

  • @reubensmart1757
    @reubensmart1757 8 років тому +4

    It's Friday and Professor Brailsford has done a computerphile video, life's good

  • @musmuk5350
    @musmuk5350 4 роки тому

    I love how you explained this! Brilliant! Thank you

  • @LukeI
    @LukeI 8 років тому

    This was an incredibly point to make. This video only needed to be 30 seconds long.

  • @RyanGates4960
    @RyanGates4960 8 років тому +8

    Title this video "HTML is more tolerant than C" or something. "HTML beats C" is really ambiguous without specifying that it beats C in specifically syntax tolerance. The general statement "HTML beats C" makes no sense because they are two very different technologies with completely different capabilities and use cases. One is a markup language, the other is a powerful low level programming language.

    • @futuza
      @futuza 3 роки тому

      But that wouldn't draw in as many clicks by being controversial.

  • @JohnnyRottenest
    @JohnnyRottenest 7 років тому +8

    I now appreciate that Python syntax for nested and sequential loops looks so dissimilar.

  • @blank001
    @blank001 4 роки тому +2

    Use whatever language turns you ON. Best programming quote ever.

  • @thephantom1492
    @thephantom1492 8 років тому

    HTML also make assumption about some stuff, like a paragraph in a paragraph is most likelly to be incorrect, so will just assume that the previous one need to be closed. In fact, many browsers (used to?) ignore the tag and basically replace by , as a new paragraph is basically that: an empty line.
    Also, it can also assume some things: in a table, if the line wasn't closed and you start a new line, then since you can't have a line in a line then it must close the previous line.
    When it fail to do the proper assumption, it just try to render it as best as it can: you forgot to close a table cell and the remaining of the table? Well, let's fit the rest of the code inside that cell...

  • @Alex55555
    @Alex55555 8 років тому +23

    So many people missed the point of the video. And maybe a lot of them didn't even finish watching the video

    • @RussellTeapot
      @RussellTeapot 8 років тому +2

      please, explain me the point of the video: I didn't got it. Seriously. I can't see how can HTML and C (or any other programming language) compared.

    • @SalahEddineH
      @SalahEddineH 8 років тому +13

      I would gladly try and explain it, to the best of my understanding:
      We CAN compare HTML to C, as they are both Languages, which have to be parsed and "understood" by a compiler or an interpreter. One of them is a Markup Language, being interpreted by a web browser, while the other is a programming language. Sure, one of them consists entirely of markup, while the other consists of instructions. But they have similarities, in that they both get parsed, and both can have nested blocks.
      The difference is in the tolerance of the parser. An HTML parser is much nicer, but does more guessing: When faced with blocks without closing tags, it will "auto-close" the first block before beginning the new block, so it guesses that the blocks are sequential instead of nested.
      C is not as tolerant, because it wants you to be explicit about what you want. If you open a block but don't close it with a }, the code just won't compile. It wants to know exactly where you ended your block, because moving a } changes drastically the behavior of a C program.
      So that's basically it. HTML parsers do guesses which might be wrong, in order to just render the page, while a C compiler doesn't want to guess what you meant.
      I hope that makes it clearer! Cheers!

  • @matteo-ciaramitaro
    @matteo-ciaramitaro 8 років тому +33

    and then there's python where instead of having to deal with forgetting curly brackets you have to deal with adding the right amount of indentation

    • @TheChrisey
      @TheChrisey 5 років тому +9

      I love it how people's arguments about why a language is better than another is because how friendly it is to bad programmers, it's no longer about what language is more capable in performance, and functionality, it's about how shitty the programmer can be before anyone notices. The programming category has been swamped with wannabe programmers over the past 15 years thanks to this ideology.

    • @salmjak
      @salmjak 4 роки тому +2

      christopher békési by your reasoning I can assume you only work with low-level languages?

    • @glasswave983
      @glasswave983 4 роки тому

      @@salmjak Probably only uses machine code

    • @FeLiNe418
      @FeLiNe418 4 роки тому +1

      @@TheChrisey the best programming languages are the most productive ones. If you can make money programming in java rather than programming in assembly, then java is better. If you can find experts more easily in a particular language, then that language is better. It's all about how much money you can make in a capitalist society.

  • @OzonesElbows
    @OzonesElbows 4 роки тому +1

    Although HTML doesn’t change the way it displays the paragraph it does effect it in CSS. For example look up css :nth-child(#)

  • @Spongman
    @Spongman 8 років тому +1

    The html spec states that p tags cannot be nested within each other. That's how the browser can unambiguously ignore the end tags. The correct behavior, even if you include end tags for the nested case is to un-nest the elements - the f12 tools will show you the re-written document and the DOM will not show the elements as nested.

  • @milolegends42
    @milolegends42 3 роки тому +3

    9:06 I am sorry but did he just say that HTML is a programming language?

  • @haydarinna631
    @haydarinna631 8 років тому +8

    Some of these comments are really sad and so are the dislikes. "Where HTML beats C" does not imply that "Overall HTML is better than C" or anything similar. The title just means "Why HTML can do something that even C can't." The video doesn't say anything like "HTML is better than C" so why are people so offended about it? (I am not talking about the people pointing out things that aren't technically correct in the video) C is only given as an example in this context, and from what I understand, he is talking about how the languages are designed to work. He is not talking about how fast or efficiently a program would run based on its language, he is talking about *why* they are designed the way they are. They could make the same points in a video about two esoteric languages.

    • @luckymouse1988
      @luckymouse1988 8 років тому +5

      Because a lot of people on the internet are self centered smug twats that jump at the chance to point out something that they perceive as wrong only to pat themselves on the back. Often, as the case here, without properly looking at the context or what is actually being said.

  • @NeoJinn
    @NeoJinn 7 років тому

    lessc and tidy are 2 neat command line utilities I use to check my css and html files for syntax errors and whatnot. It can be nice to find errors that way instead of letting the browser fumble over a bad source file

  • @Matticitt
    @Matticitt 5 років тому

    I think the title did this video a great disservice. The professor never said HTML was better or beat C - he only explained how they are different.

  • @goyabee3200
    @goyabee3200 8 років тому +24

    Video title makes no sense. Not what Dave really meant in the least.

  • @RonJohn63
    @RonJohn63 8 років тому +17

    9:06 When did a markup language morph into a programming language?

    • @stopfidgetting
      @stopfidgetting 8 років тому +1

      Since HTML5...

    • @RonJohn63
      @RonJohn63 8 років тому

      Caudex With loops and variables and conditional constructs? (I'm not talking about JavaScript.)

    • @stopfidgetting
      @stopfidgetting 8 років тому +2

      RonJohn63
      no. my joke was poor. HTML5, even with it's added functionality is still just a markup language. :P

    • @kissassparty
      @kissassparty 6 років тому +1

      HTML5 with CSS is turing complete

    • @sweetberries4611
      @sweetberries4611 5 років тому

      @@RonJohn63 VueJS lol

  • @anon-sl4vp
    @anon-sl4vp 5 років тому

    Thanks for the lesson, Professor X :)

  • @wisteela
    @wisteela 8 років тому +1

    interesting video
    Where do they get all the old style printer paper from?

  • @TaxTaxes
    @TaxTaxes 8 років тому +22

    a lot of people missing the point of the video

    • @pleasedontwatchthese9593
      @pleasedontwatchthese9593 8 років тому +9

      They really are, getting caught up in semantics. Its a simple video like html, everyone here is all C syntax error checker.

    • @janglestick
      @janglestick 8 років тому +7

      a lot of people ARE missing the point of the video.
      everyone here IS LIKE A C syntax error checker.

    • @retepaskab
      @retepaskab 8 років тому +4

      A lot of people...
      Everyone...

    • @RussellTeapot
      @RussellTeapot 8 років тому +1

      ok then, please explain that to me, since it seems I missed it also.

    • @pleasedontwatchthese9593
      @pleasedontwatchthese9593 8 років тому +2

      ***** There is a follow up video to this one. I have not seen it yet but I guess he makes his point in there.
      I personally don't find it a big deal. Whats important is someone knows how to use HTML not to get caught up in details that don't matter in the larger image.

  • @OldBrutus
    @OldBrutus 8 років тому +5

    Aside from the Markup VS Programming thing that's already been bought up enough in previous comments, it has been quite peculiar seeing the constant use of the tag as an example of HTML overall, it is by far (I can't stress this enough) the most common tag to remain unclosed in typical HTML documents, and is only one of a few (about 15) tags where you can do that. Including HTML5 there's something around a hundred HTML tags currently valid for use, and you cannot do that with most tags. This is without even bringing up things that might not break your HTML, but will likely deform your website due to your attached CSS.
    Basically while I'm not saying that the explanation provided in the video is strictly incorrect, it feels like a quite dated explanation that has not been run past someone with a more modern (And thus applicable) view of things. It is important to remember that this is not an explanation of some legacy system that is deprecated, but rather something that is still evolving and alive today, thus accuracy of information as it applies today should be quite important.

  • @jeffmbellucci
    @jeffmbellucci 8 років тому

    If you use tags you would get an entirely different result. They can be nested as deeply as you want, and to get what you are hoping for, for example 2 smaller divs inside a container div, you must have the closing tags placed correctly, and for the example I just gave, something like this would work:
    Some content

    Some other content
    If you closed the container div before opening the others, it would change the tree structure of the DOM from what you were intending.

  • @fusobotic
    @fusobotic 8 років тому +1

    I think the most annoying part of HTML is default cascading styles that you have to overwrite with a boilerplate each time you start a new project. I'm not sure how anyone would miss a closing tag unless they have no idea how to write HTML, but even so it's funny it fills that in for you.

  • @MisterPaulch
    @MisterPaulch 8 років тому +3

    Yes C does not tolarate *syntactical* errors by the programmer. (It won't compile)
    But it *will* tolarate many *logical* errors. Thats why it's so dangerous.
    Just look at Heartbleed...

    • @OtakuNoShitpost
      @OtakuNoShitpost 8 років тому +6

      To be fair, just about any programming language will tolerate logical errors.

    • @MisterPaulch
      @MisterPaulch 8 років тому +2

      But some (most modern ones) do their best to *fail* if the programmer does some unintentional logical error.
      Such as using uninitialized structs .
      C just tells us: Yeah i'll compile that for you... but you know: That is "Undefined Behaviour"
      So it let's us kick ourselfs in the nuts even though it *could* see that something is wrong.
      But well: With great power comes great responsibility

    • @soniablanche5672
      @soniablanche5672 5 років тому

      Especially when multithreading is involved.
      ie: x == x can actually give you false in a multhreaded environment

  • @Grabofus
    @Grabofus 8 років тому +3

    First off HTML is a markup language, while c is a programming language.. secondly try not closing a tag and expect it to work as a sequence.. HTML will tolerate not closing a couple tags as it doesn't make a sense to nest them(e.g: or )

  • @Deccoon
    @Deccoon 8 років тому +2

    Well, with specific CSS, the nested p-tags would look like intends.. Curious about this video

    • @anousenic
      @anousenic 8 років тому

      Nope. after is treated as if it was . So the last would be a dangling one and be ignored. No nesting happens.
      Just try it yourself if you wanna know for sure ;p

  • @kennethjor
    @kennethjor 8 років тому

    I for one thought the comparison was fine and the point made was a valid one. Thank you for many great videos :)

  • @unbreakablefootage
    @unbreakablefootage 8 років тому +4

    5:14 wait what

    • @SF-ve3rc
      @SF-ve3rc 3 роки тому

      You heard the man

  • @iroxudont
    @iroxudont 8 років тому +20

    HTML is not executed, btw.

    • @DesolateFields
      @DesolateFields 8 років тому +6

      Yeah, it's parsed. A big difference.

    • @Qman621
      @Qman621 8 років тому +1

      And then executed? Where do you draw the line for when a programming language is a program language - does it have to be written in 1s and 0s?

    • @iroxudont
      @iroxudont 8 років тому +1

      No, and then a page is rendered.
      We draw the line between programming languages and markup languages.
      Like HyperText Markup Language.
      Is in it's name.
      Even it its able to reference and embed programming languages, it is not a programming language in itself.
      When you embed javascript on a HTML page, you are just giving a bunch of code in a different language to be ran by a dedicated virtual machine.
      Same for plugins that are ran by the browser.
      None of that makes HTML a language where you program.

  • @ziggiette
    @ziggiette 4 роки тому +2

    as a web designer i love to see all the programmers being triggered by this video

  • @itskdog
    @itskdog 8 років тому

    Technically, HTML isn't a programming language, as it's only a description of a webpage layout (a "markup language", hence the ML at the end). A lot of the markup languages I've seen, especially HTML and Markdown, are very forgiving, because they KNOW that it's not 100% important to obey the syntax and more important to actually show things. Markdown has a lot less tags than HTML does, obviously, but it's designed to be a simpler HTML, and to "compile", you might say, into HTML. (Hence why heading markers (hash signs in Markdown) are optional, and a new line is assumed to be the end of the heading, forming a tag).

  • @robehickmann
    @robehickmann 8 років тому +18

    as far as I know, html in an of itself(excluding CSS, JS) isn't Turing complete, it doesn’t even have macro expansion. Calling it a 'programming language' is a misnomer.

    • @JamesBedford
      @JamesBedford 8 років тому +2

      Correct, it's not Turing complete.

    • @profdaveb6384
      @profdaveb6384 8 років тому +4

      I don't accept that a language has to be Turing Complete, or "general purpose" to qualify as a programming language! As commenters have said elsewhere, HTML is an interpreted ,declarative, special-purpose programming language. So,you can't calculate your tax bill with it -- and its main purpose is to create displayable Web pages. But it does get executed (by a Web browser) so in my view it's a special-purpose language and creating Web pages by hand is analogous to Assembler programming.

    • @robehickmann
      @robehickmann 8 років тому

      I do not agree that writing web pages by hand is smiler to assembly language as the whole system is at a much higher level, and very much designed to be easy to write by hand, even CISC assembly languages exist at a far lower level. It really isn't comparing apples with apples as the two serve entirely different functions.

    • @JamesBedford
      @JamesBedford 8 років тому

      +robehickmann really think you nailed it. Can I add, what's the use in the term "programming" if you can say that latex and html documents are "programs"!?

    • @SolomonUcko
      @SolomonUcko 6 років тому

      Have you heard of entities?

  • @BlankBrain
    @BlankBrain 8 років тому +29

    The L in HTML stands for Lazy.

    • @Hector-bj3ls
      @Hector-bj3ls 8 років тому +13

      Hyper Text Markup Lazy is it? :P

    • @06kellyjac
      @06kellyjac 8 років тому +1

      thatsthejoke.jpg :)

    • @Tatsh2DX
      @Tatsh2DX 8 років тому

      Yup. I hate the world lol

  • @davidmaxwaterman
    @davidmaxwaterman 8 років тому

    Perhaps his point is valid for the tag, but it's not so for lots of other tags....lists, for example, are quite analogous to his example and have the same problems. They are only optional when it is clear what they mean, and the definition of means it doesn't have to have one....that's not how you do what *he* thought it should do...he presumed it would indent or something...well, that's not what it is supposed to do, so it is his own error.

  • @AsbjornGrandt
    @AsbjornGrandt 8 років тому

    The HTML standard has some "block" elements that can't be nested, P is one of them, that's how browsers can implicitly place the end tags.
    DIV on the other hand can be nested, and the end tags are required, letting the browsers guess that for themselves is never going to end well.
    For the sake of everybody's sanity always use the end tag, it also saves time on the receiving browser as it won't have to run the error correction algorithms.

  • @rgrilghsrghvuailhe8314
    @rgrilghsrghvuailhe8314 8 років тому +12

    GuYs fun fact: GTA5 was coded in html

    • @Yotrymp
      @Yotrymp 8 років тому +1

      It used Java too.

    • @jackkraken3888
      @jackkraken3888 8 років тому

      Which version?

    • @ejajejsj5254
      @ejajejsj5254 6 років тому

      Lol it was a joke right!?

    • @rydiaofmist8190
      @rydiaofmist8190 6 років тому

      Windows 10 is programmed in LaTeX. MacOS is programmed in brainfuck.

    • @electronicmayonnaise5692
      @electronicmayonnaise5692 5 років тому +1

      @@rydiaofmist8190 Dude, programming MacOS in Brainf*ck would be an achievement.

  • @derstreber2
    @derstreber2 8 років тому +6

    I do like the content of this video, however, the title is a bit click baity. The TLDR would be that html tolerates coding mistakes not because it is somehow magical, but because it limits itself to only handling simple behavior. C is more powerful and therefore cannot be ambiguous.
    You could argue about which is better, a simple structure, assuming a limited behavior(how much simpler is it really though?), or the ability to easily write complex behavior unambiguously. Personally I would value the latter over the former. That is why the title "Where HTML beats C" seems click baity to me, as I don't see this as feature of HTML that beats C.

  • @LimitedWard
    @LimitedWard 4 роки тому +1

    The number of people who didn't understand the point of this video is astounding. He wasn't comparing HTML and C to point out which was better or worse. He was simply pointing out that the HTML interpreter is much more fault tolerant than the C compiler. Realistically, there's nothing stopping someone from writing a fault tolerant C compiler, but it really comes down to philosophy. C was designed to break early and often whereas HTML was designed to NEVER break even if it encounters markup it doesn't understand.

  • @wassimrahmani3561
    @wassimrahmani3561 5 років тому +2

    If C becomes as you say "more tolerant", then it will eventually be a lot harder for you to debug your program since it's no longer gonna be consistent with the rules and syntax.
    I personally think we should make languages as simple to learn as we can, but can't rely on them to correct all of our mistakes just because we're too lazy to learn or to practice.

  • @JonFawkes
    @JonFawkes 8 років тому +4

    Isn't HTML a Markup language, not a programming language? Or is there a distinction I'm unaware of?

    • @Theraot
      @Theraot 8 років тому +1

      depending who you ask :/

    • @MsHojat
      @MsHojat 8 років тому

      I don't even like calling it a language. I call it markup code. Officially it's name still calls it a language, but it doesn't follow typical rules of language at all, its just mark-up.

    • @Theraot
      @Theraot 8 років тому +1

      Mshojat it is a language, it has a proper grammar.

    • @Theraot
      @Theraot 8 років тому

      Mshojat The thing is you are equating language to intructions. I'm taking a broader meaning for language, in which a language is any way to express something (to a computer in this context) such as layout in this case.
      Please note I'm arguing "language" and not "programming language" - I say HTML is - as the same says - a markup language.

  • @GaryFerrao
    @GaryFerrao 7 років тому +4

    technically, it's not acceptable to HTML itself. that's just how the various browsers tolerate the interpretation so they get used by more people.

  • @DevinBigSeven
    @DevinBigSeven 8 років тому

    Not sure why people are complaining. This is about HTML parsers being more permissive than C parsers and so result in usable byte-code rather than a compiler/interpreter error. You could substitute HTML with JavaScript, since it has semicolon insertion, making it more permissive than C, causing runnable code with sometimes unintended results; but it's more subtle and he's been talking about SGML, XML, and HTML. What is done with the byte code is up to the interpreter or machine code generator; you could create a new programming language that uses the generated HTML byte code, the DOM tree, to do something other than tag text. HTML5 includes SVG, which can be used to create looping animations.

  • @NickKartha
    @NickKartha 5 років тому +1

    7:40 For every one "hello sean", you'd get ten "goodbye dave"s
    I'm going to use that the next time I have to teach someone nested loops.

  • @waasar
    @waasar 7 років тому +4

    Nice comparison, you could make this a series. For one I would like to see where common household items have the edge over C.

  • @americanswan
    @americanswan 8 років тому +9

    HTML should be compiled and throw lots of errors for those lazy programmers who don't use end tags.

  • @rkpetry
    @rkpetry 8 років тому

    Does the nesting-vs-sequencing effect show when you apply independent styles to your paragraphs...

  • @benw9949
    @benw9949 4 роки тому

    With the jumps from HTML4 to XHTML to HTML5, and with CSS2 to CSS3 and up, they have tried to set rules so all the developers would know how to set up consistently the same, matching process for how to parse things and what to do when there are syntax errors in the tags / markup, the HTML and CSS code. They wanted to make it more consistent across browsers and other rendering agents and programmatic uses.

  • @_abdul
    @_abdul 5 років тому +6

    The Ultimate Answer: HTML is not a Programming Language.

  • @hellterminator
    @hellterminator 8 років тому +12

    Next up: Where screwdrivers beat lawn mowers.
    Stop the clickbait, guys.

  • @Marconius6
    @Marconius6 8 років тому +2

    There is some stuff you don't need to make explicit though. For example, implicit type conversions, or generic type parameter interpretation... of course, these both have their limits.

  • @4BoltClevo
    @4BoltClevo 8 років тому

    The end goal of the page HTML is well known. It describes a page. So you can use this information to help correct and get something to display in the browser. That it describes a page is an inherent specification.
    The lowest inherent specification for a file of c code is that it describes a program. "Program" is many orders of magnitude more abstract than "webpage" and this is what makes it hard to correct errors and the simplest way is to flag ALL errors.

  • @tripplehelix
    @tripplehelix 8 років тому +3

    Seems like Dave isn't getting the message. Please Dave, shaun is here now can you go?

  • @DigitalMetal
    @DigitalMetal 8 років тому +202

    Really, you consider HTML a programming language? I mean, I love HTML. I use it as a GUI for most of my programs. But it's not a programming language. It's a Mark Up Language. To call HTML a programming language is like calling a doc file a programming language.

    • @MrToLIL
      @MrToLIL 8 років тому +48

      Both of you need to get off your high horses.
      Have you not watched any of the other videos in this series?
      Yes, HTML is not comparable to C, in regards to what you, as an individual can code.
      But HTML most definitely is a programming language.
      You expose your ignorance by calling it a "Mark Up Language".
      Or did you think a "Mark Up Language" has the capability to render video & display dynamic graphics?
      It's rather obvious it is a very powerful, but extremely standardized, and regulated programming language.
      Now build me something that can do the same.
      Lets see if it's still "Mark Up Language".

    • @MrToLIL
      @MrToLIL 8 років тому +4

      You're wrong, do some research.

    • @MrToLIL
      @MrToLIL 8 років тому +5

      Actually, it can.
      And does, what it doesn't do is expose that ability to the end user.
      So much is done by HTML, yet somehow people don't even realize.
      Hint, you use JavaScript to access these APIs.
      Yes, you are simply accessing these pre-existing APIs, but they are definitely doing some heavy lifting.
      That comment wasn't directed at you.

    • @DigitalMetal
      @DigitalMetal 8 років тому +8

      Let me say that I was not insulting HTML in any way. I'm not on any high horse. I love HTML, and as I said, I use it as a GUI for almost all of my programs. But, it's not a programming language.
      You can't program it to do anything itself. It's not a programming language in anyway.

    • @MrToLIL
      @MrToLIL 8 років тому +1

      Kris Occhipinti
      I used to think the same.
      The internet early days, was not sunshine and rainbows, far from ideal for development.
      HTML depends a lot on JS to use many of its APIs. However it wasn't planned. Why even HTML?
      But let me ask you this, what language can exist in a vacuum? At some point, there is always a dependency.
      Not to mention.
      It must run in a browser!
      So what, all languages need an engine or interpreter / compiler; unless you are writing in assembly language.
      It's a programming language.
      Edit: Forgot to mention: With tools like headless browsers and webkit driver it's even less reliant on having a browser.

  • @benw9949
    @benw9949 4 роки тому

    However, note that if you want nested lists (trees) such as outlines or menus in HTML, you nest the list tags in a way very much like he's showing improperly nested paragraphs. (Paragraphs are not supposed to be nested, as he's pointed out.) So with nested lists, you have:
    ul li (text for this li tag) ul li (here's our first nested list, indent the outline one generation) /li li (another list-item) /li ... /ul /li li (more list-items which might contains more nested lists) /li /ul
    That's a really abbreviated sketch, but the idea is, you don't really have a convenient wrapper tag for what is essentially a list-heading or a list-item, before you start the nested list within it. So the tagging structure looks too iffy or almost broken, without some sort of tag around the list-item or list-heading that goes prior to the nested list.

  • @NikolajLepka
    @NikolajLepka 8 років тому +1

    HTML and its error tolerance is exactly why we should use XHTML
    It's consistent, it allows self-closing tags, and it throws up in your face if you make a mistake. HTML doesn't do either.
    XHTML
    All tags *MUST* have a closing tag, no exceptions
    All tags *MAY* be written as a self-closing tag
    If you forget any of those it'll fail horribly, and throw an error at your face
    HTML
    Some tags have closing tags (), Some tags can't be written without (), some don't have closing tags ()
    Self-closing tags are NOT part of the HTML standard, and writing them will just cause the parser to ignore the slash, which is why doesn't work, but does, and why it makes no difference if you write or .
    If you forget any of this, it may or may not render correctly; it varies from browser to browser.
    HTML is an ungodly mess.
    The beautiful upshot of XHTML, is that things like suddenly become legal, which they weren't before, because it simply gets translated to which it *doesn't* in HTML. Another upshot of XHTML is that there are fewer rules to remember. In HTML you got one rule with 3 exceptions, in XHTML you have only one rule and a sub-rule. You don't have to remember which tags the exceptions apply to, because there aren't any.