• 0 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: May 31st, 2023

help-circle

  • Luvon@beehaw.orgtoProgrammer Humor@lemmy.mldo as i say...
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    But that is a typing weakness of that language. I just prefer using languages where the compiler actually does know what the types are at all time and thus can inform me instead of me trying to make sure that types align correctly.

    That is tedious work that has been proven to be a terrible idea to shift onto humans. Strong type systems make much more robust code.

    Abap only has one collection type, and its tables. Contextually it’s not hard to read what a collection of things are and what a single thing is.

    If I am looping through comments and do something with comment, it’s contextually clear what ma going on. The exact type can be easily checked for when it’s actually needed.

    Naming a count of something the plural seems like a much less intuitive thing. Especially sense generally the count is gotten from the collection.


  • Luvon@beehaw.orgtoProgrammer Humor@lemmy.mldo as i say...
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    This isn’t even like the worst of it. It’s an old enough language they still thought the compiler shouldn’t have to do more work.

    So you have to declare all variables, types, and methods in the top section of the class, and the method implementation in its own section. That means while working on a method, the method signature is a long way away. And because abap developers are allergic to splitting up code into reasonable classes, that can be a couple thousand lines away.

    Oh and all classes are in the global namespace. So all the classes you make must start with the letter z because SAP reserves any and all names that don’t start with z.

    Oh and they didn’t feel like making library code to do a lot of basic stuff, oh no, they thought that 3000+ keywords was a much better system. Especially sense hovering over a keyword gives no documentation and discoverable is therefore pretty terrible.

    Also they wanted everything to be sentenced like so keyword structures are often many special words in specific orders and hopefully you can write enough of it to get a prompt to fill in the rest.


  • Luvon@beehaw.orgtoProgrammer Humor@lemmy.mldo as i say...
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 year ago

    Character limits and a stupid badly used Hungarian notation to waste limited characters to tell use what the ide already knows.

    If you have a table, (that’s an array for sane programmers) name the variable as a plural and we will know it’s a table.

    Don’t name two variables the same stupid abbreviation with different Hungarian notation characters stuck to the front


  • I generally use a for each type loop or a map because I am usually applying some function across a collection, and in both cases I use the singular name from the collections plural.

    ’Cities.map(city -> …)’

    For (val city in cities)

    If I actually need the index for some reason I still prefer loop structures that give me the index and the item together

    *note syntax pulled out of my head and not necessarily belonging to any specific language.

    For ( city, index in cities)

    cities.map((city, index) -> … )

    If I need to double loop a matrix array I would use rowIndex and ColIndex for the indexes.