• Re: to all children of alloc

    From Bonita Montero@3:633/10 to All on Friday, June 12, 2026 13:21:28
    Am 08.05.2026 um 20:16 schrieb fir:

    those functions are hell, but i realized today if some gives them to use
    for people they simply should be named after Alloc, for example if
    uunction uses malloc to alloc the bitmap or font etc (or other alloc may
    be platform specyfic) the name of this function should be AllocBitmap AllocFont

    For me CreateFont() and AllocFont() doesn't make a difference. But
    people dealing with Win32 rather use MFC, which has RAII-wrappers
    around all "allocating" functions (I guess almost no one uses C
    for Win32 programming).


    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, June 12, 2026 14:39:20
    Bonita Montero pisze:
    Am 08.05.2026 um 20:16 schrieb fir:

    those functions are hell, but i realized today if some gives them to
    use for people they simply should be named after Alloc, for example if
    uunction uses malloc to alloc the bitmap or font etc (or other alloc
    may be platform specyfic) the name of this function should be
    AllocBitmap AllocFont

    For me CreateFont() and AllocFont() doesn't make a difference. But
    people dealing with Win32 rather use MFC, which has RAII-wrappers
    around all "allocating" functions (I guess almost no one uses C
    for Win32 programming).


    it makes a lot of difference becouse you can create things imo without allocating it - allocating is a special sinful event in a world of
    programming

    you ay create things for example spawn bullets or enemies liek adding
    them to managed list/array (its normal way)..thsi is not sinfull,
    this is normal

    bt allocating things is especially sinfull - and you need to
    very strictly care of this sin



    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Friday, June 12, 2026 14:48:41
    Am 12.06.2026 um 14:39 schrieb fir:

    it makes a lot of difference becouse you can create things imo without allocating it - allocating is a special sinful event in a world of programming

    If you have a resource handle as with all Create*() functions with
    Win32 this includes a memory allocation, mostly on the kernel side.
    Tell me which resources you could create / allocate without allo-
    cating memory.

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, June 12, 2026 15:13:13
    Bonita Montero pisze:
    Am 12.06.2026 um 14:39 schrieb fir:

    it makes a lot of difference becouse you can create things imo without
    allocating it - allocating is a special sinful event in a world of
    programming

    If you have a resource handle as with all Create*() functions with
    Win32 this includes a memory allocation, mostly on the kernel side.
    Tell me which resources you could create / allocate without allo-
    cating memory.

    im not talking here only on winapi but generally on all programming when
    you can be put in minefield which could be avoided if
    you would strictly use that convenction that use word Alloc (of
    Aloocate? ) on all functions that alloc ram and not use it on functions
    that dont do that

    as to winapi i dont know.. chat gpt says that CreateFile CreateEvent
    may not create new thing ..

    in general this shows additional problem that thiose winapi functions
    may alloc thing but alos may dosomething other things they may create
    some internal state and if this not need to "removed" of "fixed"
    before all other calls its ok but if this is state of such like it needs
    some fixing this is another case but it in some ways can
    be probably managed analogous way (by strict naming
    that programmer woudl know it need 'fixing')

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, June 12, 2026 15:29:08
    Bonita Montero pisze:

    For me CreateFont() and AllocFont() doesn't make a difference. But
    people dealing with Win32 rather use MFC, which has RAII-wrappers
    around all "allocating" functions (I guess almost no one uses C
    for Win32 programming).


    world of programmers is quite big so your almost noone may
    mean like 50 k people (i dont know but i would be surprised
    if that would be something like few thousands only)

    (by c i mean also this that can be compiled in c++ mode as i mysalf
    often do, but it has no c++ oop trash, i generally use nothing form c++
    mode except const int tab_max = 10000; though i think about usung
    references)

    besides you think it is good not to do things than not many people do
    ???? its good to do what many sheeps do??

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fir@3:633/10 to All on Friday, June 12, 2026 15:56:03
    fir pisze:
    Bonita Montero pisze:

    For me CreateFont() and AllocFont() doesn't make a difference. But
    people dealing with Win32 rather use MFC, which has RAII-wrappers
    around all "allocating" functions (I guess almost no one uses C
    for Win32 programming).


    world of programmers is quite big so your almost noone may
    mean like 50 k people (i dont know but i would be surprised
    if that would be something like few thousands only)

    (by c i mean also this that can be compiled in c++ mode as i mysalf
    often do, but it has no c++ oop trash, i generally use nothing form c++
    mode except const int tab_max = 10000; though i think about usung references)

    besides you think it is good not to do things than not many people do
    ???? its good to do what many sheeps do??

    i asked by curiosity how many programmers and c programmers are in the
    world and chat gpt says programmers are like 30-40 milions

    (it is possible i think but alos including maybe hobbyst programmers
    who programmed like few months in life maybe)

    as to c programmers it suggested that like maybe 5% of this programmers
    know c (probably could agree).. so maybe c programmers is about 1
    milion, maybe slightly less

    (well depend what someone calls c programmer but imo someone
    who knows c++ in some way (and is able to know thet there is c++ and c
    at his option) also could cont

    how many of them maybe not regularrly and only codes winapi in c but was
    doin asomething in it for some time? i dont know but for me
    50k or maybe maore makes sense..its probably more, becouse
    few thousand on whole world is so small its rather not rational imo
    its at least 50k and tends into 500k (im mean its in area among 50k and
    500k)

    probably even assembly programmers (people who know assembly) would be
    more than 50k

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sunday, June 14, 2026 12:03:00
    On 6/12/2026 4:21 AM, Bonita Montero wrote:
    Am 08.05.2026 um 20:16 schrieb fir:

    those functions are hell, but i realized today if some gives them to
    use for people they simply should be named after Alloc, for example if
    uunction uses malloc to alloc the bitmap or font etc (or other alloc
    may be platform specyfic) the name of this function should be
    AllocBitmap AllocFont

    For me CreateFont() and AllocFont() doesn't make a difference. But
    people dealing with Win32 rather use MFC, which has RAII-wrappers
    around all "allocating" functions (I guess almost no one uses C
    for Win32 programming).


    Fwiw... MFC is basically total garbage. ATL, kind of crappy...

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Monday, June 15, 2026 07:58:07
    Am 14.06.2026 um 21:03 schrieb Chris M. Thomasson:

    Fwiw... MFC is basically total garbage. ATL, kind of crappy...

    It's not good C++. But if you're fixed to Windows it's as effective as Qt.

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Monday, June 15, 2026 01:15:42
    On 6/14/2026 10:58 PM, Bonita Montero wrote:
    Am 14.06.2026 um 21:03 schrieb Chris M. Thomasson:

    Fwiw... MFC is basically total garbage. ATL, kind of crappy...

    It's not good C++. But if you're fixed to Windows it's as effective as Qt.

    Fwiw, remember the message cracker macros from MS? ;^o

    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Bonita Montero@3:633/10 to All on Monday, June 15, 2026 11:01:42
    Am 15.06.2026 um 10:15 schrieb Chris M. Thomasson:

    On 6/14/2026 10:58 PM, Bonita Montero wrote:

    It's not good C++. But if you're fixed to Windows it's as effective as
    Qt.

    Fwiw, remember the message cracker macros from MS? ;^o

    Yes, MFC is bad design, but effective.


    --- PyGate Linux v1.5.16
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)