• Buddy (unregistered) in reply to Jay
    Jay:
    Dennis:
    When the 'is equals' operator ceases to be commutative, then you're in for a world of hurt.

    Equality can't be commutative - commutativity means that the order of terms used in an operator don't matter e.g. ab=ba. Note that a notion of equality is required to test commutativity.

    Equality is symmetric - "a=b" implies "b=a"

    Just to be joyously contrarian:

    Yes, in ALGEBRA, it is meaningless to ask whether equality is commutative because equality is a relation and not an operation. It can be, for example, reflexive, symmetric, and transitive, but not commutative.

    But in many computer languages, including Java and C++, equality is an operation. "a==b" is an operation on two values that returns a value, true or false. It is perfectly valid to include it as a part of a larger expression, like in C I could write "((a==b)+1&7)", and that could be evaluated to give some result.

    Therefore, in such languages, to say that equality is commutative is a completely valid and meaningful statement. Just as "2+3" gives the same result as "3+2", namely "5", and thus addition can be said to be commutative, so "2==3" gives the same result as "3==2", namely "false", and thus equality can be said to be commutative.

    It's rather intellectually amusing, if you're of that frame of mind. Perhaps compiler writers have introduced a fundamental advance to mathematics without really thinking about it: unifying the concepts of "commutivity" and "symmetry".

    ...

    Thank you. That's what I meant by "is equal" operator, but didn't want to get into a discussion of abstract algebra. You explained it much better than I could.

  • tycho (unregistered) in reply to Trerro

    Just to be clear, Perl arrays don't allow access through non-integer indexes. Perl hashes do, though. In PHP, they noticed that arrays are special cases of hashes, and so just collapsed them into a single data structure. It has it's appeal, I suppose. I just wouldn't want to program without a distinction between a hash and an array.

  • (cs) in reply to tycho
    tycho:
    Just to be clear, Perl arrays don't allow access through non-integer indexes. Perl hashes do, though. In PHP, they noticed that arrays are special cases of hashes, and so just collapsed them into a single data structure. It has it's appeal, I suppose. I just wouldn't want to program without a distinction between a hash and an array.

    Another way of thinking of this is that PHP added "array-like" capabilities to the Awk associative-array structure, as long as the data follows certain rules. Either way you look at it though, it's still broken. Table-ish things and Order-ish things really are fundamentally different.

  • Brian (unregistered)

    At least the guy followed a consistent pattern.

  • hobbes (unregistered) in reply to tycho
    tycho:
    Just to be clear, Perl arrays don't allow access through non-integer indexes. Perl hashes do, though. In PHP, they noticed that arrays are special cases of hashes, and so just collapsed them into a single data structure. It has it's appeal, I suppose. I just wouldn't want to program without a distinction between a hash and an array.
    I've had a similar discussion ( argument ) with a coworker a number of times. My point of view is this; As a language, it's job is to enable me to do what I need to do and get out of the way the rest of the time.

    In PHP's case, it collapses down a number of different variable types ( python's dictionaries and lists ) in to a single variable type. This works for me, as now I don't have to worry about what type of variable I should use here, or as the algorithm updates if I need to change it. That's the job of the compiler/language/computer to keep track of that data, mine is simply to implement the algorithm.

    I mean really, why should I care if I am implementing a list or a dictionary? How is me worrying about that beneficial to the implementation of the algorithm?

  • M2tM (unregistered) in reply to Kazan

    PHP is a bad language. It is a poorly planned cobbling of various elements over a long period of time.

    I work with the language every work day and there are various real-world problems with the language, just do a google search for a few examples. This is not to say that you need to write poor code because the language itself is poor, it is also not to say that PHP hasn't been getting better over time. I write very clean and readable code with the language.

    But to suggest PHP itself doesn't deserve some amount of poking fun at is silly. I mean, honestly, whenever you've got something like magic quotes (or hell, any language feature that needs to be called "magic") you know you're getting into some scary territory. Yes it is depreciated, but you still have to account for it when developing applications because unfortunately older versions of PHP litter the internet primarily due to the one .ini to rule them all (per server.)

    PHP is a prime example of how over-simplification can actually lead to more complication.

  • Earnestine (unregistered)

    The finance committee's April report said Ottawa should "examine increased support for first-time house buyers," but it failed to make a unique policy recommendation. www.youtube.com OSFI is setting a brand new minimum qualifying rate, or stress test, ” for uninsured mortgages (mortgage consumers with first payment 20% or greater than their house price).v

  • ThomasHaine (unregistered)

    Пластиковые окна под ключ от производителя https://okno.ooo/works/540-plastikovye-okna-na-vynose-uvelichenie-balkona-za-schet-vynosa

    Качество нашей продукции cоответствует всем СНИПам и ГОСТам и подтверждено сертификатами https://okno.ooo/articles/534-promerzanie-i-kondensat-na-oknakh

    Цена от 18 000 руб https://okno.ooo/images/works/2018/04/1-04/balkon-sapozhok-2_600x800.jpg

    Однокамерный стеклопакет с энергосберегающим стеклом эффективнее двухкамерного стеклопакета https://okno.ooo/images/FOTO/Holod-Alumin-Vinos/IMG_0118.jpg Плюс облегчение оконной конструкции снижает нагрузку на фурнитуру и увеличивает срок ее службы https://okno.ooo/works/531-osteklenie-kbe-s-otdelkoj

    Доставка и монтаж: 3 515 руб https://okno.ooo/articles/203-zakazat-balkonnoe-okno

    3 https://okno.ooo/articles/202-gde-zakazat-ustanovku-okon Быстрая и безопасная доставка окон https://okno.ooo/fasadnye-okna

  • BrianVew (unregistered)
    Comment held for moderation.
  • ThomasHaine (unregistered)
    Comment held for moderation.
  • Jamesdob (unregistered)

    Города и курорты http://planeta-int.com/country/czech/hotels

    По всем вопросам звоните по тел http://planeta-int.com/country/braziliya 8 924 823 18 88 http://planeta-int.com/country/russia/krasnodarskij-kraj/sanatorii

    Хочется сказать спасибо Николаю за его молниеносность в решении вопросов , его профессионализм в подборе тура во Вьетнам http://planeta-int.com/country/switzerland Точность, четкость и вообще молодчинка http://planeta-int.com/country/fiji/hotels http://planeta-int.com/country/sweden/hotels Приятно иметь дело http://planeta-int.com/country/britain Еще раз спасибо http://planeta-int.com/company/awards

    На старт! Внимание! Марш! Стартуем в активное путешествие по Маломорскому побережью! Несмотря на то, что маршрут небольшой, вы испытаете максимум эмоций от багги! 04 http://planeta-int.com/country/austria/tours 12 3 дня 35 000 руб http://planeta-int.com/country/russia/tours 05 http://planeta-int.com/country/filippiny 12 12 дней 88 100 руб http://planeta-int.com/country/srilanka 07 http://planeta-int.com/country/spain 12 7 дней 54 500 руб http://planeta-int.com/country/israel/tours 18 http://planeta-int.com/country/italy 12 12 дней 77 200 руб http://planeta-int.com/country/yaponiya/tours 21 http://planeta-int.com/country/filippiny/tours/o.-palavan 12 7 дней 57 400 руб http://planeta-int.com/country/czech/hotels 12 http://planeta-int.com/country/argentina/hotels 01 12 дней 102 300 руб http://planeta-int.com/country/singapore/ekskursii 13 http://planeta-int.com/country/france/tours 01 7 дней 67 500 руб http://planeta-int.com/country/israel 15 http://planeta-int.com/country/srilanka 01 12 дней 100 800 руб http://planeta-int.com/country/braziliya/tours

    СПА-ОТЕЛЬ ГРЕЙС ГОРИЗОНТ http://planeta-int.com/country/mauritius/tours

  • GeorgeMaync (unregistered)
    Comment held for moderation.
  • SteveteN (unregistered)
    Comment held for moderation.
  • MatthewKek (unregistered)
    Comment held for moderation.
  • SteveteN (unregistered)
    Comment held for moderation.
  • Michaelhem (unregistered)
    Comment held for moderation.
  • AnthonyABamb (unregistered)
    Comment held for moderation.
  • RobertFetty (unregistered)

    На другой день он, с одною мыслию не жалеть себя и не отставать ни в чем от них, ходил с народом за Трехгорную заставу https://ot-ido.art/work/view?id=1748 Но когда он вернулся домой, убедившись, что Москву защищать не будут, он вдруг почувствовал, что то, что ему прежде представлялось только возможностью, теперь сделалось необходимостью и неизбежностью https://ot-ido.art/u/urkova-margarita Он должен был, скрывая свое имя, остаться в Москве, встретить Наполеона и убить его с тем, чтобы или погибнуть, или прекратить несчастье всей Европы, происходившее, по мнению Пьера, от одного Наполеона https://ot-ido.art/virtual-gallery/view?id=6&page=2&per-page=12

    Ваза для цветов – декоративный элемент, который приукрасит любой сад https://ot-ido.art/work/view?id=11097 Пригодятся 2 формы https://ot-ido.art/work/artfit?id=1605 Первая – силиконовая, для готовки кексов, большего размера, и вторая – поменьше, обычный пластиковый горшок https://ot-ido.art/work/view?id=5121 Их нужно обработать маслом, с внутренней и внешней стороны https://ot-ido.art/work/view?id=6757

    Парки с пейзажной планировкой, имеющие характерный плавный рисунок аллей, живописные поляны, озеленение, создающее условия, близкие к естественным, с чередованием зеленых массивов и лужаек, требуют специфических приемов размещения декоративной скульптуры https://ot-ido.art/work/view?id=8136 Такие парки чаще всего организуются на территории с ярко выраженным рельефом, что способствует максимальному раскрытию красоты ландшафта, созданию разнообразных видов, своеобразных групп деревьев, появляющихся внезапно из-за поворота https://ot-ido.art/work/artfit?id=6754

    Прием увязки скульптуры с беседкой: I — дорога II — скульптура III — однотонная полоса цветов IV — беседка 1 — дуб красный 2 — береза бородавчатая 3 — смешанные посадки лиственных деревьев Но значение бронзы для других, чем делает статуи использования является невыгодным для сохранения скульптур Несколько крупных древних бронзы сохранились, так как многие были переплавлены, чтобы

  • MatthewKek (unregistered)
    Comment held for moderation.
  • DavidFup (unregistered)
    Comment held for moderation.
  • MartinErori (unregistered)
    Comment held for moderation.
  • MartinErori (unregistered)

    I gave https://www.cornbreadhemp.com/products/cbd-sleep-gummies a try for the maiden habits, and I'm amazed! They tasted distinguished and provided a sense of calmness and relaxation. My emphasis melted away, and I slept outstrip too. These gummies are a game-changer for me, and I highly endorse them to anyone seeking spontaneous pain alleviation and improved sleep.

  • cbd gummies (unregistered)
    Comment held for moderation.
  • DennisDum (unregistered)
    Comment held for moderation.

Leave a comment on “Can You Say Your $a, $b, $c's?”

Log In or post as a guest

Replying to comment #:

« Return to Article