# Unsure about properties

**URL:** https://discourse.julialang.org/t/unsure-about-properties/110756
**Category:** General Usage
**Tags:** properties
**Created:** [February 26, 2024, 4:10am UTC](https://discourse.julialang.org/t/unsure-about-properties/110756 "2024-02-26T04:10:46Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)
#### Post date: [February 26, 2024, 9:11am UTC](https://discourse.julialang.org/t/unsure-about-properties/110756/4 "2024-02-26T09:11:08Z")

</div>

> [@sadish-d](#):
>
> Is it okay to use underscores as property names? `S()._` is currently valid syntax.

Probably a bad idea. I’d swear there’s an issue in the context of [#24990](https://github.com/JuliaLang/julia/pull/24990) where some argue that `S()._` being allowed is a bug, an oversight from when `_` variables became forbidden before 1.0, and it might be “fixed” if #24990 ever gets merged.

> [@sadish-d](#):
>
> Should we be allowed to define properties for `Type{S}`?

I think the short answer is: don’t do it.

The more technical answer: as I understand, even if you own `S` you don’t own `Type{S}` and the usual piracy rules apply: you’re free to define `getproperty(::Type{S}, ::T)` where `T` is a type you own, but that’s largely useless, what you typically want is the case `T == String` or `T == Symbol` and that would be type piracy and it will cause problems.

---

_[View the full topic](https://discourse.julialang.org/t/unsure-about-properties/110756)._
