# Why not use Structures

**URL:** <https://ifnotnil.com/t/why-not-use-structures/3475>\
**Category:** Xojo\
**Tags:** xojo\
**Created:** [12 August 2023 21:31 UTC](https://ifnotnil.com/t/why-not-use-structures/3475 "2023-08-12T21:31:39Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [15 August 2023 11:56 UTC](https://ifnotnil.com/t/why-not-use-structures/3475/41 "2023-08-15T11:56:27Z")

</div>

Practical in that they make some thing harder to refactor or subclass since they lock you into specific design considerations because they use specific data types (Cstrings) or cant be subclassed  
And that you separate logic from data and have to revert to a more procedural style rather than an OO style

Are there bugs in them ? As Eugene noted there are some issues with alignments on Windows that can give you fits but I suspect that doesnt affect your usage

---

<div class="post-metadata">

**Author:** ![Jeannot](https://ifnotnil.com/user_avatar/ifnotnil.com/jeannot/32/3787_2.png) [@Jeannot](https://ifnotnil.com/u/Jeannot)\
**Post date:** [15 August 2023 12:14 UTC](https://ifnotnil.com/t/why-not-use-structures/3475/42 "2023-08-15T12:14:40Z")

</div>

> [@npalardy](#):
>
> And that you separate logic from data and have to revert to a more procedural style rather than an OO style

Isn’t it a fundamental issue with Xojo that many users tend to work more procedurally, or at most, in an “event-driven” manner because the UI objects trigger events? In any case, the foreign code I’ve come across was rarely object-oriented, probably because Xojo doesn’t strictly enforce it. How is a beginner supposed to learn it properly? ☹

Please don’t misunderstand me; I’m not implying that the original poster or any other core user here doesn’t know what objects are. I’ve often contemplated the fact that Xojo promotes object orientation but seldom demonstrates good practices. This is all the more surprising since nearly every modern programming language today also emphasizes teaching users the proper way to utilize their language.

This is one of the reasons why I responded so strongly: there’s little value in claiming you can use Xojo correctly if no one is taught the proper way to do so. Well, unfortunately, that train has already left for me as well 🙂

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [15 August 2023 12:46 UTC](https://ifnotnil.com/t/why-not-use-structures/3475/43 "2023-08-15T12:46:37Z")

</div>

Entirely possible and plausible  
Certainly you do see that occur a lot

---

<div class="post-metadata">

**Author:** ![Jeannot](https://ifnotnil.com/user_avatar/ifnotnil.com/jeannot/32/3787_2.png) [@Jeannot](https://ifnotnil.com/u/Jeannot)\
**Post date:** [15 August 2023 13:26 UTC](https://ifnotnil.com/t/why-not-use-structures/3475/44 "2023-08-15T13:26:07Z")

</div>

anyways - for the birds in time of “low code” and natural intelligence in Austin 🙂

---

<div class="post-metadata">

**Author:** ![Karen](https://ifnotnil.com/letter_avatar_proxy/v4/letter/k/7feea3/32.png) [@Karen](https://ifnotnil.com/u/Karen)\
**Post date:** [15 August 2023 14:09 UTC](https://ifnotnil.com/t/why-not-use-structures/3475/45 "2023-08-15T14:09:35Z")

</div>

> [@npalardy](#):
>
> Practical in that they make some thing harder to refactor or subclass since they lock you into specific design considerations because they use specific data types (Cstrings) or cant be subclassed  
> And that you separate logic from data and have to revert to a more procedural style rather than an OO style

The way I use them typically is to define them in a class and use it as a class property… basically a custom defined basic data type… and I don’t use them that way with strings… So I don’t see how either of those things are **necessarily** so.

Anyway to each their own. As long as using them way I do does not cause bugs, I’m happy.

-Karen

[Previous page](https://ifnotnil.com/t/why-not-use-structures/3475.md?page=2)
